MACD+ Strategy [SystemAlpha]This is a strategy based on MACD Oscillator . Instead of using just the normal crossovers, we use trend filters, trailing stop loss and take profit targets. This strategy was developed for crypto, forex and stocks on daily timeframe but feel free to experiment on 15 minutes or higher using heikin ashi or normal candles
In this strategy you have a choice of:
Trend Filters:
- Average Directional Index ( ADX )  – buy when price is trend is up and sell when trend is down.
- Moving Average (MA) – buy when price close above the defined moving average and sell when price close below moving average
- Parabolic SAR – buy when SAR is above price is above price and sell when SAR is below price.
- All - Use ADX , MA and SAR as filters
For MA Filter , you can use the “TF MA Type”  and "TF MA Period" parameter to select Simple or Exponential Moving Average and length.
Stop Loss:
- Average True Range (ATR) – ATR % stop as trailing stop loss.
- Parabolic SAR ( SAR ) – Parabolic SAR adapted as trailing stop loss.
 
For ATR , you can use the “ATR Trailing Stop Multiplier” parameter to set an initial offset for trailing stop loss.
Take Profit Target:
- Average True Range (ATR) – ATR % stop as trailing stop loss.
- Standard % – Percent as target profit
 
For ATR , you can use the “ATR Take Profit Multiplier” parameter to set an initial offset for trailing stop loss.
Additional feature include:
- Regular and Hidden Divergence display and alerts
STRATEGY ONLY:
- Set back test date range
- Set trade direction - Long, Short or Both
- Use timed exit - Select method and bars
- Method 1: Exit after specified number of bars.
- Method 2: Exit after specified number of bars, ONLY if position is currently profitable.
- Method 3: Exit after specified number of bars, ONLY if position is currently losing.
TradingView Links:
Alerts: 
MACD: 
How to use:
1. Apply the script by browsing through Indicators --> Invite-Only scripts and select the indicator
2. Once loaded, click the gear (settings) button to select/adjust the parameters based on your preference.
3. Wait for the next BUY or SELL signal to enter the trade!
Disclaimer:
The indicator and signals generated do not constitute investment advice; are provided solely for informational purposes and therefore is not an offer to buy or sell a security; are not warranted to be correct, complete or accurate; and are subject to change without notice.
In den Scripts nach "stop loss" suchen
MACD+ Alerts [SystemAlpha]This is the alert companion of the MACD+ Strategy . Instead of using just the normal crossovers, we use trend filters, trailing stop loss and take profit targets. This strategy was developed for crypto, forex and stocks on daily timeframe but feel free to experiment on 15 minutes or higher using heikin ashi or normal candles.
In this alert you have a choice of:
Trend Filters:
- Average Directional Index ( ADX )  – buy when price is trend is up and sell when trend is down.
- Moving Average (MA) – buy when price close above the defined moving average and sell when price close below moving average
- Parabolic SAR – buy when SAR is above price is above price and sell when SAR is below price.
- All - Use ADX , MA and SAR as filters
For MA Filter , you can use the “TF MA Type”  and "TF MA Period" parameter to select Simple or Exponential Moving Average and length.
Stop Loss:
- Average True Range (ATR) – ATR % stop as trailing stop loss.
- Parabolic SAR ( SAR ) – Parabolic SAR adapted as trailing stop loss.
 
For ATR , you can use the “ATR Trailing Stop Multiplier” parameter to set an initial offset for trailing stop loss.
Take Profit Target:
- Average True Range (ATR) – ATR % stop as trailing stop loss.
- Standard % – Percent as target profit
 
For ATR , you can use the “ATR Take Profit Multiplier” parameter to set an initial offset for trailing stop loss.
Additional feature include:
- Regular and Hidden Divergence display and alerts
Alerts:
When creating alerts use “Once Per Bar Close” parameter for Long and Short and “Once Per Bar” for Close, Trailing Stop, Take Profit and Divergence.
TradingView Links:
Strategy: 
MACD: 
How to use:
1. Apply the script by browsing through Indicators --> Invite-Only scripts and select the indicator
2. Once loaded, click the gear (settings) button to select/adjust the parameters based on your preference.
3. Wait for the next BUY or SELL signal to enter the trade!
Disclaimer:
The indicator and signals generated do not constitute investment advice; are provided solely for informational purposes and therefore is not an offer to buy or sell a security; are not warranted to be correct, complete or accurate; and are subject to change without notice.
WaveTrend+ Strategy [SystemAlpha]This is a WaveTrend strategy based on WaveTrend Oscillator. In addition to using the normal crossovers, we use trend filters, trailing stop loss and take profit targets. WT+ Strategy was developed for crypto, forex and stocks for 15 minutes to daily timeframe. The main goal was to catch long term trends and ride them.
In this strategy you have a choice of:
Trend Filters:
- Average Directional Index (ADX)  – buy when price is trend is up and sell when trend is down.
- Moving Average (MA) – buy when price close above the defined moving average and sell when price close below moving average
- Parabolic SAR – buy when SAR is above price is above price and sell when SAR is below price.
- All - Use ADX, MA and SAR as filters
	For MA Filter , you can use the “TF MA Type”  and "TF MA Period" parameter to select Simple or Exponential Moving Average and length.
Stop Loss:
- Average True Range (ATR) – ATR % stop as trailing stop loss.
- Parabolic SAR (SAR) – Parabolic SAR adapted as trailing stop loss.
  
	For ATR , you can use the “ATR Trailing Stop Multiplier” parameter to set an initial offset for trailing stop loss.
Take Profit Target:
- Average True Range (ATR) – ATR % stop as trailing stop loss.
- Standard % – Percent as target profit
  
	For ATR , you can use the “ATR Take Profit Multiplier” parameter to set an initial offset for trailing stop loss.
Additional feature include: 
- Regular and Hidden Divergence display and alerts
- Filter Overbought and Oversold 
- Use WT Cross for Exit
STRATEGY ONLY:
- Set backtest dates
- Set Trade direction - Long, Short or Both
- Use timed exit - Select method and bars
	- Method 1: Exit after specified number of bars.
	- Method 2: Exit after specified number of bars, ONLY if position is currently profitable.
	- Method 3: Exit after specified number of bars, ONLY if position is currently losing.
TradingView Links:
WT+ Oscillator Companion: 
WT+ Alerts: 
How to use:
1. Apply the script by browsing through Indicators --> Invite-Only scripts and select the indicator
2. Once loaded, click the gear (settings) button to select/adjust the parameters based on your preference. 
3. Wait for the next BUY or SELL signal to enter the trade!
Disclaimer:
The indicator and signals generated do not constitute investment advice; are provided solely for informational purposes and therefore is not an offer to buy or sell a security; are not warranted to be correct, complete or accurate; and are subject to change without notice.
WaveTrend+ Alerts [SystemAlpha]This is the alert companion of the WaveTrend+ Strategy  . Instead of using just the normal crossovers, we use trend filters, trailing stop loss and take profit targets. WT+ Strategy was developed for crypto, forex and stocks for 15 minutes to daily timeframe. The main goal was to catch long term trends and ride them.
In this alert you have a choice of:
Trend Filters:
- Average Directional Index (ADX)  – buy when price is trend is up and sell when trend is down.
- Moving Average (MA) – buy when price close above the defined moving average and sell when price close below moving average
- Parabolic SAR – buy when SAR is above price is above price and sell when SAR is below price.
- All - Use ADX, MA and SAR as filters
	For MA Filter , you can use the “TF MA Type”  and "TF MA Period" parameter to select Simple or Exponential Moving Average and length.
Stop Loss:
- Average True Range (ATR) – ATR % stop as trailing stop loss.
- Parabolic SAR (SAR) – Parabolic SAR adapted as trailing stop loss.
  
	For ATR , you can use the “ATR Trailing Stop Multiplier” parameter to set an initial offset for trailing stop loss.
Take Profit Target:
- Average True Range (ATR) – ATR % stop as trailing stop loss.
- Standard % – Percent as target profit
  
	For ATR , you can use the “ATR Take Profit Multiplier” parameter to set an initial offset for trailing stop loss.
Additional feature include: 
- Regular and Hidden Divergence display and alerts
- Filter Overbought and Oversold 
- Use WT Cross for Exit
TradingView Links:
WT+ Oscillator: 
How to use:
1. Apply the script by browsing through Indicators --> Invite-Only scripts and select the indicator
2. Once loaded, click the gear (settings) button to select/adjust the parameters based on your preference. 
3. Wait for the next BUY or SELL signal to enter the trade!
Disclaimer:
The indicator and signals generated do not constitute investment advice; are provided solely for informational purposes and therefore is not an offer to buy or sell a security; are not warranted to be correct, complete or accurate; and are subject to change without notice.
Algorithm Builder - Multiple Trends+ (Plug & Play)Hello traders
 I. SCRIPTS ACCESS AND TRIALS 
 1. For the trial request access, they have to be done through my website . 
 2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here :  Daveatt 
   Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
 3. You may also contact me directly for more information 
 II. Algorithm Builder - Multiple Trends 
 2.1 Forewords 
The Multiple Trends+ is the update of the  Multiple Trends  and includes a built-in Trade Manager and PnL/Risk-Reward Panel
This indicator is available only to our PREMIUM users. Our PREMIUM indicators offer more trading analysis capabilities and opportunities.
A few words of caution: the Algorithm Builders - Multiple Trends are more advanced and as such, would require slightly more time to be mastered. 
They're not that much difficult, but we understand that designing a trading system with 2 trends might be slightly more complicated - however, there is nothing to be scared of :).
The time spent to learn how to use our PREMIUM tools might be rewarded handsomely.
 2.2 Concept 
The Algorithm Builder - Multiple Trends is made to detect the convergence of many unrelated indicators and give a BUY or SELL signal whenever all the selected sub-indicators are converging in the same direction.
This is an upgrade of the PRO package giving access to the Algorithm Builder - Single Trend - designed to show 1 unique entry per trend - whereas the Multiple Trends offers re-entries in the same direction of the trend if the indicator detects good convergences to accumulate more positions.
 III. Plug & Play 
Hope you're ready to be impressed. Because, what I'm about to introduce, is my best-seller feature - and available across many of my indicators.
In TradingView, there is a feature called "Indicator on Indicator" meaning you can use an external indicator as a data source for another indicator. 
I'm using that feature to connect any external indicator to our Algorithm Builder Multiple Trends+ Plug & Play (hence the plug and play name). 
Let's assume we have an RSI divergence indicator - which is not part of the Algorithm Builder - but noticed that the convergence of an RSI divergence and a MACD gives strong signals.
 I mentioned an RSI divergence, but you may connect any oscillator (MACD, On balance volume, stochastic RSI, True Strenght index, and many more..) or non-oscillator (divergence, trendline break, higher highs/lower lows, candlesticks pattern, price action, harmonic patterns, ...) indicators. 
THE SKY IS (or more likely your imagination) is the limit :)
Fear no more. The Plug&Play technology allows you to connect it and use it in the convergence/confluence calculations. 
Hence, whenever the MACD and RSI divergence will be in the same direction  every time  you'll get a convergence. 
PS: Whereas it's only the first time only because this is a Single trend edition.
To connect your external indicator to ours, we're using a native TradingView feature, which is not available for all users.
It depends on your TradingView subscription plan ( More info here )
If you intend to use our Algorithm Plug&Play indicator, and/or our Backtest Plug&Play suites, then you must upgrade your TradingView account to enjoy those features.
We value our relationship with our customers seriously, and that's why we're warning upfront you that a compatible TradingView account type is required - at least PRO+ or PREMIUM to add more than 1 Plug&Play indicator per account.
 We go in-depth on our website why the Plug&Play is an untapped opportunity for many traders out there - URL available on my profile status and signature 
 IV. Multiple Trends versus Single Trend 
 4.1 Multiple Trends benefits 
A friend asked us recently Why using the Multiple Trends if we can use the Single Trend in a smaller timeframe, and get more entries that way?
We thought this was an excellent question, but the answer is obvious.
 Using a Single Trend on a smaller timeframe to solely getting more entries will reduce the security of the given trades.  
We designed the Algorithm Builders to take a trade in an identified trend but reducing the timeframe too much will mostly increase your risk - and might lead to capital loss.
By the way, this is a universal rule valid also for a big majority of indicators.
We're absolutely not saying that the Single Trend won't work on small timeframes because actually it really does. But, if you find out a great configuration for your Single Trend, and want to get more signals without increasing your risk - then the Multiple Trends would be a very viable option.
 4.2 Main signal versus secondary signals 
For the main and secondary trends, the color green symbolizes any identified "BUY" trend. And the color red symbolizes any identified "SELL" trend.
-The MAIN trend symbol is unique and symbolized by a triangle.
- The SECONDARY (could also be called re-entries) trends are multiple and symbolized by a diamond.
In the Algorithm Builder indicator settings, they're identified with the  Additional  keyword.
 4.3 How the convergences are calculated 
Extremely important: The diamonds (or re-entries) are displayed, as long as a triangle (or main/primary signal) is displayed.
For a trend change (buy to sell or sell to buy), the system waits for  ALL selected re-entries sub-indicators , to give a convergence/confluence in the opposite direction.
For example, let's assume a BUY/green convergence based on 3 indicators. One or Two of them going turning red, won't be enough for a trend change.
But, if all of them turn red, then we'll see a red triangle - signaling the beginning of a new downtrend.
 4.4 Why multiple entries? 
Here are a few use cases :
1. The main use case why we made those Multiple Trends indicators: A trader got invalidated or stopped out on a trade, but wants a system to let hin/her jump back in with a minimum of security. (security depending on the configuration of the Algorithm Builder as a whole).
This is very frustrating to get in a trade, being stopped out, and finally, see the trade going in the expected direction.
Even more frustrating to jump back in at the end of a trend, and get stopped out again - we all agree on this.
2. You want to add more positions on your main trade as your Algo Builder identified a solid trend - this is a nice way to possibly maximize your gains.
Once again, we don't/won't guarantee any performance result (not because we don't believe in our tools, but for legal reason), all depends on the time spent reading our documentation and playing with the Algo Builder - as explained on our Tutorials.
More info available on our website. URL available in this script signature and on my profile status.
 V. Why the Algorithm Builder Multiple Trends+ may help you 
I worked with many traders during my career, and their feedback about trading is often pretty similar. 
They all tried a lot of complicated indicators, losing their capital, and finally getting back to the basics (even to the basic indicators if I might say)
The art is finding a good combination of indicators and setting strict money/risk management rules. 
Easy in concept, but more than 90+% of traders lose money on the markets... which teach us that trading is not only about drawing trendlines, or using cool indicators but finding ways to ease our psychology while trading.
 5.1 The Algorithm Builder trading framework 
The sub-indicators (full list on our website) weren't chosen randomly. They're based on a trading method we've developed over the last 6 years - while working with traders and other trading quants.
The Algo Builders are made to detect a convergence - and as such, will give a signal once a trend has been identified. 
They're not made to detect reversal but have been designed to give a signal when all sub-indicators are either ALL bullish (green) or ALL bearish (red).
We provide a framework based on indicators we selected because they:
1. make sense to be used altogether
2. work on asset classes like INDEX, CRYPTO, STOCK OPTIONS, FOREX, COMMODITIES
3. it may expand your knowledge about what detecting a convergence with pre-selected indicator really means
 5.2 Supports and Resistances 
The indicator displays the  main algorithmic supports and resistances  according to our trading method.
I think they're relevant for all asset classes, but you're absolutely free to use any different supports/resistances logic if you want to. 
I'm not against it because I know that pivots, Fibonacci levels, etc. may work very well also.
 5.3 Choose your favorite risk management algorithm 
1/ Pre-defined Algo S/R method using:
- a supertrend of the stop-loss
- the nearest algorithmic resistances for the take profit levels.
2/ Define your own Stop-loss and Take-profits level in real-time
 Stop-Loss Management 
For what's following, let's assume that 2 is the stop-loss value you inserted in the indicator, and the Algorithm Builder gives a BUY signal.
This is NOT a recommendation at all, only an example to explain how this feature works.
- %Trailing: The Stop-Loss starts 2% away from the entry price - and will move up (because we're on a BUY trade as per our example) every time your trade will gain 2% profit
- Percentage: The Stop-Loss stays static 2% away from the entry price. There is no trailing here
- TP Trailing: This is a very awesome feature. The stop-loss is set 2% away when the trades start.
    When the TP1 is hit, the stop-loss will be moved to the Entry price (also called breakeven).
    When the TP2 is hit, the SL is moved to the previous TP1 position
- Fixed: Set the Stop-Loss at a fixed position (value should be in currency/units)
 Take Profits Management 
You can manage up to 2 take profit levels defined as a percentage or price value.
The expected input is in percentage value (for instance, setting the % target of TP1 to 2% will set the TP1 level 2% away from the entry price
 5.4 Built-in Trade Manager  
This is very likely the most loved utility script that we shared on TradingView. 
It's included in your Algorithm Builder - Single Trend+, and will certainly help you immensely to analyze your charts and your trades. 
We made sure that all the graphical elements on the chart will be updated in real-time whenever our user change anything on the indicator configuration. 
You'll also be able to change the Trade Manager labels positions as you wish :)
 5.5 Built-in Risk-to-Reward Panel  
The good stuff doesn't stop here.
You'll notice that this sometimes green (when in a LONG), sometimes red (when in a SHORT) panel at the right of your chart.
It displays for the selected trading algorithmic (see 2.3.2 above), a ton of useful real-time analytics.
- Entry Price: the price when the Algorithm Builder will give a signal.
- The Trade PnL in percentage.
- Entry Stop Loss: Distance (in currency/units) between the selected stop-loss algorithm (percent, trailing, TP trailing, etc.) and the entry price.
- Entry TP1: Distance (in currency/units) between the entry price and the first take profit
- Entry TP2: Distance (in currency/units) between the entry price and the second take profit
- Risk/Reward TP1: Using the Stop-loss distance at entry, and Take Profit 1 at entry to compute the risk-to-reward ratio.
- Risk/Reward TP2: Using the Stop-loss distance at entry, and Take Profit 2 at entry to compute the risk-to-reward ratio.
For more details, please check the guides section of my website. Links are in my signature and profile status.
 5.6 Built-in PnL real-time calculations 
YES!!!! you read it correctly
The panel displays the risk-to-reward ratios but also the PnL (Profit and Loss in percentage value) of the current and last trade
 5.7 Hard Exits 
Our trading method is known for the hard exits, also called invalidation. 
The Single Trend+ includes a hard exit based on a MACD - settings are flexible and you may update them.
Having a stop-loss protecting your trade is a best practice - Protecting your stop-loss also from getting hit is incredible. 
We prefer invalidate a few positions, even if sometimes we don't want to. Rather than the market hard exiting on us, and leaving with our hard-working money.
 5.8 Alerts 
Alerts are enabled for:
- BUY/SELL MAIN triangles signals
- BUY/SELL SECONDARY diamond signals
- Trade Manager alerts (Stop Loss, Take Profit 1, Take Profit 2)
- Hard Exits
 VI. Pain points that we're trying to solve with our Algorithm Builders 
 Issue      #1     There are many informations / indicators / strategies / backtests / noise. Finding the right ones is not a simple task.
 Solution #1     A reliable system that removes the external noise is much needed in trading to stay "in the game".
 Issue      #2     Trading could be quite stressful - The majority doesn't lose in trading because technical analysis is hard, but because managing our psychology is one of the hardest things a human can do.
 Solution #2     Some ways to reduce the "trading stress" could be: getting better quality signals and trading like a "machine". Forgetting about Twitter and trusting the system you designed.
 Issue       #3    Trading without strict rules and only based on what we feel, or what we think the market should do is the fastest way to kiss our money goodbye.
                               Only 1 indicator generally is not enough. Traders generally use a combination of several indicators but they're monitoring them individually.
                               It's normal then to feel exhausted at the end of the day ^^ (to say the least)... and exhaustion leads to mistakes which leads to..... (I'm sure you got it) ... capital loss.
 Solution  #3    As a trader, I needed a trading framework and a method. I offer our trading method but they're plenty others out there. We cannot claim obviously it's the best ever ....but let's say we're using those exact same 
                               scripts ourselves for our trading. And this what we've been recommending our clients to trade with for the past years. Also, having a tool detecting the convergence of several indicators and giving 1 unique signal 
                               for BUY/SELL position will save you a lot of time/energy, and perhaps might help you out getting better trading performance.
 VII. Resolving a complex puzzle and having fun in the process 
Trading has to stay a passion and not (only be) a source of intense stress. 
The most successful traders I know are "trading geeks" - literally always looking for optimizing, searching for the best possible entries, setups, indicators, tools, etc.
For them, it's not even about the money anymore, but only about beating their previous performance.
Why are they doing this?  Because it's fun 
Might appears as a bold statement, but I guarantee that looking for setups is fun. 
One of our users even told us, that it's like playing with "Legos" and we couldn't possibly agree more.
 VIII. Designing a system that "makes sense" 
Another bold statement now. Brace yourselves ladies and gentlemen
The Algorithm Builders allow to design trading systems quickly. What could takes days/weeks/months to find out... might be now within your reach in less than a few hours.
With a bit of practice,  less than an hour  might be enough per asset/timeframe to find a system that makes sense to you and adapted to your trading capital and psychology.
Assuming our users read our guides and are fully committed to learning a new way of trading - then we do guarantee you'll be able to design kick-ass trading systems that make sense.
"Making sense" doesn't mean at all it's guaranteed to win, it means you're the one defining the convergence of indicators, using your Algorithm Builder, and observe that most of the time - whenever there is a BUY signal, the candlesticks are going upwards - whenever there is a SELL signal, it's going downwards.
This is a necessary step to make real progress from a trading analyst perspective - and hopefully could lead to profits.
 VIII. Algorithm Builder versus the main trader enemy(=psychology) 
This indicator has the goal to help solving one of the MAIN issues encountered by traders. 
Most of traders realize, they can't perform with only 1 indicator (or 1 price pattern or 1 price action) and need a combination of multiple indicators before getting in a trade.
Far from being a magic pill, if it could at least reduce the stress you have while trading, then we'll consider we made a great job - it's a technical "useless noise remover", and needs to be followed strictly.
Such trust in a trading system can only be built by testing your Algorithm Builder configuration on either:
1. a demo account 
2. or a live account with small bids. And then, increasing progressively the bids if your capital increases progressively.
Though, you should still use your common sense. (for instance: if we get a BUY signal right on a big timeframe resistance we're hitting for the first time). 
I'm aware this is a new way of trading but for many, and while we cannot foresee the future, neither predict performance, we believe it might save you a lot of time to find good signals.
My maximum level of happiness will be reached the day when our users will contact me and showing me setups being mine. 
I'm sure that even I can learn from my users and, we can all learn from each other Algorithm Builder configuration
 IX. What is a wrong or bad configuration? 
Simply put. If you see that most of your signals react such as described below:
1. a buy triangle/diamond predicts, most of the time an upwards move
2. a sell triangle/diamond predicts, most of the time a downwards move
3. you estimated yourself the stop-loss needed to give enough room for your trades.
4. take profits based on algorithmic support and resistances or your own take profit method.
So what's a good Algorithm Builder configuration? A configuration you're happy with and makes sense.
A better Algorithm Builder setup is one used in demo or a live account w/ small bids for a few weeks, and you're consistent in your trading performance.
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators. You only will be the judge, and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Algorithm Builder - Multiple Trends+ (+ Trade Manager and Panel)Hello traders
 I. SCRIPTS ACCESS AND TRIALS 
 1. For the trial request access, they have to be done through my website . 
 2. My website URL is in this script signature at the very bottom (you'll have to scroll down a bit and going past the long description) and in my profile status available here :  Daveatt 
   Due to the new scripts publishing house rules, I won't mention the URL here directly. As I value my partnership with TradingView very much, I prefer showing you the way for finding them :)
 3. You may also contact me directly for more information 
 II. Algorithm Builder - Multiple Trends 
 2.1 Forewords 
The Multiple Trends+ is the update of the  Multiple Trends  and includes a built-in Trade Manager and PnL/Risk-Reward Panel
This indicator is available only to our PREMIUM users. Our PREMIUM indicators offer more trading analysis capabilities and opportunities.
A few words of caution: the Algorithm Builders - Multiple Trends are more advanced and as such, would require slightly more time to be mastered. 
They're not that much difficult, but we understand that designing a trading system with 2 trends might be slightly more complicated - however, there is nothing to be scared of :).
The time spent to learn how to use our PREMIUM tools might be rewarded handsomely.
 2.2 Concept 
The Algorithm Builder - Multiple Trends is made to detect the convergence of many unrelated indicators and give a BUY or SELL signal whenever all the selected sub-indicators are converging in the same direction.
This is an upgrade of the PRO package giving access to the Algorithm Builder - Single Trend - designed to show 1 unique entry per trend - whereas the Multiple Trends offers re-entries in the same direction of the trend if the indicator detects good convergences to accumulate more positions.
 III. Multiple Trends versus Single Trend 
 3.1 Multiple Trends benefits 
A friend asked us recently Why using the Multiple Trends if we can use the Single Trend in a smaller timeframe, and get more entries that way?
We thought this was an excellent question, but the answer is obvious.
 Using a Single Trend on a smaller timeframe to solely getting more entries will reduce the security of the given trades.  
We designed the Algorithm Builders to take a trade in an identified trend but reducing the timeframe too much will mostly increase your risk - and might lead to capital loss.
By the way, this is a universal rule valid also for a big majority of indicators.
We're absolutely not saying that the Single Trend won't work on small timeframes because actually it really does. But, if you find out a great configuration for your Single Trend, and want to get more signals without increasing your risk - then the Multiple Trends would be a very viable option.
 3.2 Main signal versus secondary signals 
For the main and secondary trends, the color green symbolizes any identified "BUY" trend. And the color red symbolizes any identified "SELL" trend.
-The MAIN trend symbol is unique and symbolized by a triangle.
- The SECONDARY (could also be called re-entries) trends are multiple and symbolized by a diamond.
In the Algorithm Builder indicator settings, they're identified with the  Additional  keyword.
 3.3 How the convergences are calculated 
Extremely important: The diamonds (or re-entries) are displayed, as long as a triangle (or main/primary signal) is displayed.
For a trend change (buy to sell or sell to buy), the system waits for  ALL selected re-entries sub-indicators , to give a convergence/confluence in the opposite direction.
For example, let's assume a BUY/green convergence based on 3 indicators. One or Two of them going turning red, won't be enough for a trend change.
But, if all of them turn red, then we'll see a red triangle - signaling the beginning of a new downtrend.
 3.4 Why multiple entries? 
Here are a few use cases :
1. The main use case why we made those Multiple Trends indicators: A trader got invalidated or stopped out on a trade, but wants a system to let hin/her jump back in with a minimum of security. (security depending on the configuration of the Algorithm Builder as a whole).
This is very frustrating to get in a trade, being stopped out, and finally, see the trade going in the expected direction.
Even more frustrating to jump back in at the end of a trend, and get stopped out again - we all agree on this.
2. You want to add more positions on your main trade as your Algo Builder identified a solid trend - this is a nice way to possibly maximize your gains.
Once again, we don't/won't guarantee any performance result (not because we don't believe in our tools, but for legal reason), all depends on the time spent reading our documentation and playing with the Algo Builder - as explained on our Tutorials.
More info available on our website. URL available in this script signature and on my profile status.
 IV. Why the Algorithm Builder Multiple Trends+ may help you 
I worked with many traders during my career, and their feedback about trading is often pretty similar. 
They all tried a lot of complicated indicators, losing their capital, and finally getting back to the basics (even to the basic indicators if I might say)
The art is finding a good combination of indicators and setting strict money/risk management rules. 
Easy in concept, but more than 90+% of traders lose money on the markets... which teach us that trading is not only about drawing trendlines, or using cool indicators but finding ways to ease our psychology while trading.
 4.1 The Algorithm Builder trading framework 
The sub-indicators (full list on our website) weren't chosen randomly. They're based on a trading method we've developed over the last 6 years - while working with traders and other trading quants.
The Algo Builders are made to detect a convergence - and as such, will give a signal once a trend has been identified. 
They're not made to detect reversal but have been designed to give a signal when all sub-indicators are either ALL bullish (green) or ALL bearish (red).
We provide a framework based on indicators we selected because they:
1. make sense to be used altogether
2. work on asset classes like INDEX, CRYPTO, STOCK OPTIONS, FOREX, COMMODITIES
3. it may expand your knowledge about what detecting a convergence with pre-selected indicator really means
 4.2 Supports and Resistances 
The indicator displays the  main algorithmic supports and resistances  according to our trading method.
I think they're relevant for all asset classes, but you're absolutely free to use any different supports/resistances logic if you want to. 
I'm not against it because I know that pivots, Fibonacci levels, etc. may work very well also.
 4.3 Choose your favorite risk management algorithm 
1/ Pre-defined Algo S/R method using:
- a supertrend of the stop-loss
- the nearest algorithmic resistances for the take profit levels.
2/ Define your own Stop-loss and Take-profits level in real-time
 Stop-Loss Management 
For what's following, let's assume that 2 is the stop-loss value you inserted in the indicator, and the Algorithm Builder gives a BUY signal.
This is NOT a recommendation at all, only an example to explain how this feature works.
- %Trailing: The Stop-Loss starts 2% away from the entry price - and will move up (because we're on a BUY trade as per our example) every time your trade will gain 2% profit
- Percentage: The Stop-Loss stays static 2% away from the entry price. There is no trailing here
- TP Trailing: This is a very awesome feature. The stop-loss is set 2% away when the trades start.
    When the TP1 is hit, the stop-loss will be moved to the Entry price (also called breakeven).
    When the TP2 is hit, the SL is moved to the previous TP1 position
- Fixed: Set the Stop-Loss at a fixed position (value should be in currency/units)
 Take Profits Management 
You can manage up to 2 take profit levels defined as a percentage or price value.
The expected input is in percentage value (for instance, setting the % target of TP1 to 2% will set the TP1 level 2% away from the entry price
 4.4 Built-in Trade Manager  
This is very likely the most loved utility script that we shared on TradingView. 
It's included in your Algorithm Builder - Single Trend+, and will certainly help you immensely to analyze your charts and your trades. 
We made sure that all the graphical elements on the chart will be updated in real-time whenever our user change anything on the indicator configuration. 
You'll also be able to change the Trade Manager labels positions as you wish :)
 4.5 Built-in Risk-to-Reward Panel  
The good stuff doesn't stop here.
You'll notice that this sometimes green (when in a LONG), sometimes red (when in a SHORT) panel at the right of your chart.
It displays for the selected trading algorithmic (see 2.3.2 above), a ton of useful real-time analytics.
- Entry Price: the price when the Algorithm Builder will give a signal.
- The Trade PnL in percentage.
- Entry Stop Loss: Distance (in currency/units) between the selected stop-loss algorithm (percent, trailing, TP trailing, etc.) and the entry price.
- Entry TP1: Distance (in currency/units) between the entry price and the first take profit
- Entry TP2: Distance (in currency/units) between the entry price and the second take profit
- Risk/Reward TP1: Using the Stop-loss distance at entry, and Take Profit 1 at entry to compute the risk-to-reward ratio.
- Risk/Reward TP2: Using the Stop-loss distance at entry, and Take Profit 2 at entry to compute the risk-to-reward ratio.
For more details, please check the guides section of my website. Links are in my signature and profile status.
 4.6 Built-in PnL real-time calculations 
YES!!!! you read it correctly
The panel displays the risk-to-reward ratios but also the PnL (Profit and Loss in percentage value) of the current and last trade
 4.7 Hard Exits 
Our trading method is known for the hard exits, also called invalidation. 
The Single Trend+ includes a hard exit based on a MACD - settings are flexible and you may update them.
Having a stop-loss protecting your trade is a best practice - Protecting your stop-loss also from getting hit is incredible. 
We prefer invalidate a few positions, even if sometimes we don't want to. Rather than the market hard exiting on us, and leaving with our hard-working money.
 4.8 Alerts 
Alerts are enabled for:
- BUY/SELL MAIN triangles signals
- BUY/SELL SECONDARY diamond signals
- Trade Manager alerts (Stop Loss, Take Profit 1, Take Profit 2)
- Hard Exits
 V. Pain points that we're trying to solve with our Algorithm Builders 
 Issue      #1     There are many informations / indicators / strategies / backtests / noise. Finding the right ones is not a simple task.
 Solution #1     A reliable system that removes the external noise is much needed in trading to stay "in the game".
 Issue      #2     Trading could be quite stressful - The majority doesn't lose in trading because technical analysis is hard, but because managing our psychology is one of the hardest things a human can do.
 Solution #2     Some ways to reduce the "trading stress" could be: getting better quality signals and trading like a "machine". Forgetting about Twitter and trusting the system you designed.
 Issue       #3    Trading without strict rules and only based on what we feel, or what we think the market should do is the fastest way to kiss our money goodbye.
                               Only 1 indicator generally is not enough. Traders generally use a combination of several indicators but they're monitoring them individually.
                               It's normal then to feel exhausted at the end of the day ^^ (to say the least)... and exhaustion leads to mistakes which leads to..... (I'm sure you got it) ... capital loss.
 Solution  #3    As a trader, I needed a trading framework and a method. I offer our trading method but they're plenty others out there. We cannot claim obviously it's the best ever ....but let's say we're using those exact same 
                               scripts ourselves for our trading. And this what we've been recommending our clients to trade with for the past years. Also, having a tool detecting the convergence of several indicators and giving 1 unique signal 
                               for BUY/SELL position will save you a lot of time/energy, and perhaps might help you out getting better trading performance.
 VI. Resolving a complex puzzle and having fun in the process 
Trading has to stay a passion and not (only be) a source of intense stress. 
The most successful traders I know are "trading geeks" - literally always looking for optimizing, searching for the best possible entries, setups, indicators, tools, etc.
For them, it's not even about the money anymore, but only about beating their previous performance.
Why are they doing this?  Because it's fun 
Might appears as a bold statement, but I guarantee that looking for setups is fun. 
One of our users even told us, that it's like playing with "Legos" and we couldn't possibly agree more.
 VII. Designing a system that "makes sense" 
Another bold statement now. Brace yourselves ladies and gentlemen
The Algorithm Builders allow to design trading systems quickly. What could takes days/weeks/months to find out... might be now within your reach in less than a few hours.
With a bit of practice,  less than an hour  might be enough per asset/timeframe to find a system that makes sense to you and adapted to your trading capital and psychology.
Assuming our users read our guides and are fully committed to learning a new way of trading - then we do guarantee you'll be able to design kick-ass trading systems that make sense.
"Making sense" doesn't mean at all it's guaranteed to win, it means you're the one defining the convergence of indicators, using your Algorithm Builder, and observe that most of the time - whenever there is a BUY signal, the candlesticks are going upwards - whenever there is a SELL signal, it's going downwards.
This is a necessary step to make real progress from a trading analyst perspective - and hopefully could lead to profits.
 VII. Algorithm Builder versus the main trader enemy(=psychology) 
This indicator has the goal to help solving one of the MAIN issues encountered by traders. 
Most of traders realize, they can't perform with only 1 indicator (or 1 price pattern or 1 price action) and need a combination of multiple indicators before getting in a trade.
Far from being a magic pill, if it could at least reduce the stress you have while trading, then we'll consider we made a great job - it's a technical "useless noise remover", and needs to be followed strictly.
Such trust in a trading system can only be built by testing your Algorithm Builder configuration on either:
1. a demo account 
2. or a live account with small bids. And then, increasing progressively the bids if your capital increases progressively.
Though, you should still use your common sense. (for instance: if we get a BUY signal right on a big timeframe resistance we're hitting for the first time). 
I'm aware this is a new way of trading but for many, and while we cannot foresee the future, neither predict performance, we believe it might save you a lot of time to find good signals.
My maximum level of happiness will be reached the day when our users will contact me and showing me setups being mine. 
I'm sure that even I can learn from my users and, we can all learn from each other Algorithm Builder configuration
 VIII. What is a wrong or bad configuration? 
Simply put. If you see that most of your signals react such as described below:
1. a buy triangle/diamond predicts, most of the time an upwards move
2. a sell triangle/diamond predicts, most of the time a downwards move
3. you estimated yourself the stop-loss needed to give enough room for your trades.
4. take profits based on algorithmic support and resistances or your own take profit method.
So what's a good Algorithm Builder configuration? A configuration you're happy with and makes sense.
A better Algorithm Builder setup is one used in demo or a live account w/ small bids for a few weeks, and you're consistent in your trading performance.
If you have any doubt or question, please hit me up directly or ask in the comments section of this script.
I'll never claim I have the best trading methodology or the best indicators. You only will be the judge, and I'll appreciate all the questions and feedback you're sending my way.
They help me a ton to develop indicators based on all the requests I received.
Kind regards,
Dave
Renko Emulator Strategy # 🚀 Renko Emulator Strategy for Normal Candlestick Charts
Transform your trading with this advanced Renko-based strategy that works seamlessly on normal candlestick charts!
## ✨ What Makes This Special?
### 🎯 Smart Signal System
- **One Signal at a Time**: No confusing duplicate signals
- **Position State Tracking**: Always know your current position
- **Automatic Target Detection**: T1, T2, T3 calculated automatically
- **10 Comprehensive Alerts**: Never miss an opportunity
### 🔧 Technical Excellence
- **Renko Logic**: Filters market noise using brick formations
- **ATR-Based Sizing**: Adapts to market volatility
- **Multi-Indicator Confirmation**: EMA, RSI, MACD, Supertrend
- **Volume Validation**: Only high-probability setups
## 📊 How It Works
### Entry Signals
🟢 **LONG (BUY)**
- Reversal: Red bricks → First green brick
- Trend: 3+ consecutive green bricks
- With full technical confirmation
🔴 **SHORT (SELL)**
- Reversal: Green bricks → First red brick
- Trend: 3+ consecutive red bricks
- With full technical confirmation
### Position Management
📍 **Stop Loss**: Last opposite brick ± buffer
🎯 **Target 1**: 2× Brick size → Book 50%
🎯 **Target 2**: 3× Brick size → Book 30%
🎯 **Target 3**: 4× Brick size → Book 20%
### Exit Rules
⚠️ Opposite brick formation
⚠️ RSI extremes (>80 or <20)
⚠️ Manual exit as needed
## 🎨 Visual Features
### On Your Chart
- 📊 Renko brick overlays
- 🟢 Green triangles = BUY signals
- 🔴 Red triangles = SELL signals
- ⚪ Target hit markers (T1, T2, T3)
- 📈 Trend indicators overlay
- 🎨 Position background color
### Info Panel
Real-time dashboard showing:
- Current brick size & color
- Position status (LONG/SHORT/NONE)
- Consecutive brick count
- RSI level
- Trend direction
- Market conditions
## 🔔 Complete Alert System
**10 Alerts Available:**
✅ Long & Short Entry
✅ All 6 Target Hits (T1, T2, T3 each)
✅ Long & Short Exit
**Alert Messages Include:**
- Entry price & direction
- Profit booking instructions
- Risk management tips
- Next action guidance
## 💰 Best Instruments
### Highly Effective On:
- **Indian Markets**: Nifty 50, Bank Nifty
- **Stocks**: HDFC, Reliance, TCS, Infosys
- **Forex**: EUR/USD, GBP/USD, USD/JPY
- **Crypto**: BTC, ETH, major altcoins
- **Commodities**: Gold, Silver, Crude Oil
### Recommended Timeframes:
- **Day Trading**: 5-min, 15-min
- **Swing Trading**: 1-hour, 4-hour
- **Position Trading**: Daily
## ⚙️ Customizable Settings
### Brick Configuration
- ATR-based (automatic) or Fixed points
- Adjustable ATR period & multiplier
- Visual brick display on/off
### Indicator Parameters
- EMA length (default: 20)
- RSI period (default: 14)
- MACD settings (12, 26, 9)
- Supertrend (10, 3)
- Volume filter toggle
### Display Options
- Show/hide entry signals
- Show/hide target levels
- Show/hide info table
- Brick overlay transparency
## 📈 Usage Strategy
### For Beginners:
1. Add to chart with default settings
2. Wait for clear BUY/SELL arrows
3. Follow position management rules
4. Use recommended stop losses
5. Book profits at targets
### For Advanced Traders:
1. Optimize brick size per instrument
2. Fine-tune indicator parameters
3. Combine with your strategy
4. Backtest thoroughly
5. Scale position sizes
## ⚠️ Risk Management
### Built-in Protection:
- Maximum 2% risk per trade
- Clear stop loss levels
- Defined profit targets
- Position size calculator
- Daily loss limits
### Best Practices:
✅ Test on demo first
✅ Use proper position sizing
✅ Follow stop losses strictly
✅ Don't over-trade
✅ Maintain trading journal
## 🎓 What You Get
### Immediate Benefits:
- Clear entry/exit signals
- No analysis paralysis
- Reduced emotional trading
- Systematic approach
- Professional risk management
### Learning Opportunities:
- Understand Renko concepts
- Master position management
- Learn risk control
- Develop discipline
- Build consistent strategy
## 🐛 Troubleshooting
### No Signals?
- Check indicator settings
- Verify brick size not too large
- Ensure volume filter appropriate
- Try different timeframe
### Too Many Signals?
- Increase brick size
- Use higher timeframe
- Enable stricter filters
- Check signal filtering active
## 📊 Performance Notes
### Works Best In:
✅ Trending markets
✅ Clear directional moves
✅ Good liquidity
✅ Normal volatility
### Avoid Trading:
❌ Major news events
❌ Low volume periods
❌ Extreme volatility
❌ Choppy/sideways markets
## 🔄 Updates & Support
**Current Version**: 2.0
**Recent Updates:**
- ✅ Fixed duplicate signals
- ✅ Added position tracking
- ✅ Enhanced alert system
- ✅ Improved visual feedback
- ✅ Better target detection
**Future Plans:**
- Additional customization
- More alert options
- Advanced features
- Performance improvements
## 📜 Important Disclaimer
⚠️ **Please Read Carefully:**
This indicator is for **educational purposes only**. Trading involves substantial risk of loss. Past performance does not guarantee future results.
**You Must:**
- Use proper risk management
- Test strategies before live trading
- Never risk more than you can afford to lose
- Consult financial advisor if needed
- Understand your trading instrument
**The creator assumes no responsibility for trading losses incurred using this indicator.**
## 🙏 Credits
- Renko Concept: Traditional Japanese charting
- ATR Calculation: J. Welles Wilder
- Community Feedback: Beta testers & users
---
## 💬 Feedback Welcome!
If you find this helpful:
- ⭐ Like the indicator
- 💬 Share your feedback
- 🐛 Report bugs
- 💡 Suggest improvements
- 🔄 Share with traders
## 📞 Getting Started
1. **Add to Chart**: Click "Add to Chart"
2. **Configure Settings**: Adjust as needed
3. **Set Alerts**: Enable notifications
4. **Test First**: Use demo account
5. **Go Live**: Start small, scale up
---
**Happy Trading! 📈🚀**
**Trade Smart. Trade Safe. Trade Profitable.**
---
*Remember: Discipline + Risk Management + Good Strategy = Success*
*No indicator is perfect. Use as part of complete trading plan.*
Zero Lag Trend Signals (MTF) [Quant Trading] V7Overview 
The Zero Lag Trend Signals (MTF) V7 is a comprehensive trend-following strategy that combines Zero Lag Exponential Moving Average (ZLEMA) with volatility-based bands to identify high-probability trade entries and exits. This strategy is designed to reduce lag inherent in traditional moving averages while incorporating dynamic risk management through ATR-based stops and multiple exit mechanisms.
This is a longer term horizon strategy that takes limited trades. It is not a high frequency trading and therefore will also have limited data and not > 100 trades.
 How It Works 
 Core Signal Generation: 
The strategy uses a Zero Lag EMA (ZLEMA) calculated by applying an EMA to price data that has been adjusted for lag:
 
 Calculate lag period: floor((length - 1) / 2)
 Apply lag correction: src + (src - src )
 Calculate ZLEMA: EMA of lag-corrected price
 
Volatility bands are created using the highest ATR over a lookback period multiplied by a band multiplier. These bands are added to and subtracted from the ZLEMA line to create upper and lower boundaries.
 Trend Detection: 
The strategy maintains a trend variable that switches between bullish (1) and bearish (-1):
 
 Long Signal:  Triggers when price crosses above ZLEMA + volatility band
 Short Signal:  Triggers when price crosses below ZLEMA - volatility band
 
 Optional ZLEMA Trend Confirmation: 
When enabled, this filter requires ZLEMA to show directional momentum before entry:
 
 Bullish Confirmation:  ZLEMA must increase for 4 consecutive bars
 Bearish Confirmation:  ZLEMA must decrease for 4 consecutive bars
 
This additional filter helps avoid false signals in choppy or ranging markets.
 Risk Management Features: 
The strategy includes multiple stop-loss and take-profit mechanisms:
 
 Volatility-Based Stops:  Default stop-loss is placed at ZLEMA ± volatility band
 ATR-Based Stops:  Dynamic stop-loss calculated as entry price ± (ATR × multiplier)
 ATR Trailing Stop:  Ratcheting stop-loss that follows price but never moves against position
 Risk-Reward Profit Target:  Take-profit level set as a multiple of stop distance
 Break-Even Stop:  Moves stop to entry price after reaching specified R:R ratio
 Trend-Based Exit:  Closes position when price crosses EMA in opposite direction
 
 Performance Tracking: 
The strategy includes optional features for monitoring and analyzing trades:
 
 Floating Statistics Table:  Displays key metrics including win rate, GOA (Gain on Account), net P&L, and max drawdown
 Trade Log Labels:  Shows entry/exit prices, P&L, bars held, and exit reason for each closed trade
 CSV Export Fields:  Outputs trade data for external analysis
 
 Default Strategy Settings 
 Commission & Slippage: 
 
 Commission: 0.1% per trade
 Slippage: 3 ticks
 Initial Capital: $1,000
 Position Size: 100% of equity per trade
 
 Main Calculation Parameters: 
 
 Length: 70 (range: 70-7000) - Controls ZLEMA calculation period
 Band Multiplier: 1.2 - Adjusts width of volatility bands
 
 Entry Conditions (All Disabled by Default): 
 
 Use ZLEMA Trend Confirmation: OFF - Requires ZLEMA directional momentum
 Re-Enter on Long Trend: OFF - Allows multiple entries during sustained trends
 
 Short Trades: 
 
 Allow Short Trades: OFF - Strategy is long-only by default
 
 Performance Settings (All Disabled by Default): 
 
 Use Profit Target: OFF
 Profit Target Risk-Reward Ratio: 2.0 (when enabled)
 
 Dynamic TP/SL (All Disabled by Default): 
 
 Use ATR-Based Stop-Loss & Take-Profit: OFF
 ATR Length: 14
 Stop-Loss ATR Multiplier: 1.5
 Profit Target ATR Multiplier: 2.5
 Use ATR Trailing Stop: OFF
 Trailing Stop ATR Multiplier: 1.5
 Use Break-Even Stop-Loss: OFF
 Move SL to Break-Even After RR: 1.5
 Use Trend-Based Take Profit: OFF
 EMA Exit Length: 9
 
 Trade Data Display (All Disabled by Default): 
 
 Show Floating Stats Table: OFF
 Show Trade Log Labels: OFF
 Enable CSV Export: OFF
 Trade Label Vertical Offset: 0.5
 
 Backtesting Date Range: 
 
 Start Date: January 1, 2018
 End Date: December 31, 2069
 
 Important Usage Notes 
 
 Default Configuration:  The strategy operates in its most basic form with default settings - using only ZLEMA crossovers with volatility bands and volatility-based stop-losses. All advanced features must be manually enabled.
 Stop-Loss Priority:  If multiple stop-loss methods are enabled simultaneously, the strategy will use whichever condition is hit first. ATR-based stops override volatility-based stops when enabled.
 Long-Only by Default:  Short trading is disabled by default. Enable "Allow Short Trades" to trade both directions.
 Performance Monitoring:  Enable the floating stats table and trade log labels to visualize strategy performance during backtesting.
 Exit Mechanisms:  The strategy can exit trades through multiple methods: stop-loss hit, take-profit reached, trend reversal, or trailing stop activation. The trade log identifies which exit method was used.
 Re-Entry Logic:  When "Re-Enter on Long Trend" is enabled with ZLEMA trend confirmation, the strategy can take multiple long positions during extended uptrends as long as all entry conditions remain valid.
 Capital Efficiency:  Default setting uses 100% of equity per trade. Adjust "default_qty_value" to manage position sizing based on risk tolerance.
 Realistic Backtesting:  Strategy includes commission (0.1%) and slippage (3 ticks) to provide realistic performance expectations. These values should be adjusted based on your broker and market conditions.
 
 Recommended Use Cases 
 
 Trending Markets:  Best suited for markets with clear directional moves where trend-following strategies excel
 Medium to Long-Term Trading:  The default length of 70 makes this strategy more appropriate for swing trading rather than scalping
 Risk-Conscious Traders:  Multiple stop-loss options allow traders to customize risk management to their comfort level
 Backtesting & Optimization:  Comprehensive performance tracking features make this strategy ideal for testing different parameter combinations
 
 Limitations & Considerations 
 
 Like all trend-following strategies, performance may suffer in choppy or ranging markets
 Default 100% position sizing means full capital exposure per trade - consider reducing for conservative risk management
 Higher length values (70+) reduce signal frequency but may improve signal quality
 Multiple simultaneous risk management features may create conflicting exit signals
 Past performance shown in backtests does not guarantee future results
 
 Customization Tips 
For more aggressive trading:
 
 Reduce length parameter (minimum 70)
 Decrease band multiplier for tighter bands
 Enable short trades
 Use lower profit target R:R ratios
 
For more conservative trading:
 
 Increase length parameter
 Enable ZLEMA trend confirmation
 Use wider ATR stop-loss multipliers
 Enable break-even stop-loss
 Reduce position size from 100% default
 
For optimal choppy market performance:
 
 Enable ZLEMA trend confirmation
 Increase band multiplier
 Use tighter profit targets
 Avoid re-entry on trend continuation
 
 Visual Elements 
The strategy plots several elements on the chart:
 
 ZLEMA line (color-coded by trend direction)
 Upper and lower volatility bands
 Long entry markers (green triangles)
 Short entry markers (red triangles, when enabled)
 Stop-loss levels (when positions are open)
 Take-profit levels (when enabled and positions are open)
 Trailing stop lines (when enabled and positions are open)
 Optional ZLEMA trend markers (triangles at highs/lows)
 Optional trade log labels showing complete trade information
 
 Exit Reason Codes (for CSV Export) 
When CSV export is enabled, exit reasons are coded as:
 
 0 = Manual/Other
 1 = Trailing Stop-Loss
 2 = Profit Target
 3 = ATR Stop-Loss
 4 = Trend Change
 
 Conclusion 
Zero Lag Trend Signals V7 provides a robust framework for trend-following with extensive customization options. The strategy balances simplicity in its core logic with sophisticated risk management features, making it suitable for both beginner and advanced traders. By reducing moving average lag while incorporating volatility-based signals, it aims to capture trends earlier while managing risk through multiple configurable exit mechanisms.
The modular design allows traders to start with basic trend-following and progressively add complexity through ZLEMA confirmation, multiple stop-loss methods, and advanced exit strategies. Comprehensive performance tracking and export capabilities make this strategy an excellent tool for systematic testing and optimization.
 Note: This strategy is provided for educational and backtesting purposes. All trading involves risk. Past performance does not guarantee future results. Always test thoroughly with paper trading before risking real capital, and adjust position sizing and risk parameters according to your risk tolerance and account size. 
================================================================================
 TAGS: 
================================================================================
trend following, ZLEMA, zero lag, volatility bands, ATR stops, risk management, swing trading, momentum, trend confirmation, backtesting
================================================================================
 CATEGORY: 
================================================================================
Strategies
================================================================================
 CHART SETUP RECOMMENDATIONS: 
================================================================================
For optimal visualization when publishing:
 
 Use a clean chart with no other indicators overlaid
 Select a timeframe that shows multiple trade signals (4H or Daily recommended)
 Choose a trending asset (crypto, forex major pairs, or trending stocks work well)
 Show at least 6-12 months of data to demonstrate strategy across different market conditions
 Enable the floating stats table to display key performance metrics
 Ensure all indicator lines (ZLEMA, bands, stops) are clearly visible
 Use the default chart type (candlesticks) - avoid Heikin Ashi, Renko, etc.
 Make sure symbol information and timeframe are clearly visible
 
================================================================================
 COMPLIANCE NOTES: 
================================================================================
✅ Open-source publication with complete code visibility
✅ English-only title and description
✅ Detailed explanation of methodology and calculations
✅ Realistic commission (0.1%) and slippage (3 ticks) included
✅ All default parameters clearly documented
✅ Performance limitations and risks disclosed
✅ No unrealistic claims about performance
✅ No guaranteed results promised
✅ Appropriate for public library (original trend-following implementation with ZLEMA)
✅ Educational disclaimers included
✅ All features explained in detail
================================================================================
My setup [Pro] (fadi)My Setup   is a powerful TradingView indicator that visualizes your trading strategy, helping you find high-probability setups with precision and discipline. It combines Higher Timeframe (HTF) context with Lower Timeframe (LTF) entries on a single chart, streamlining your trading process.
 What It Does 
 
  Tracks your chosen timeframe and its paired higher timeframe for custom trade setups, so you don’t have to stay glued to the screen.
  Plots clear Entry, Stop Loss, and Take Profit levels when your conditions align.
  Customizes to your strategy with HTF triggers (e.g., sweeps, liquidity grabs) and LTF entries (e.g., Order Blocks, FVGs, Breakers).
  Ensures discipline by only showing setups that meet all your rules, eliminating emotional trading and FOMO.
  Backtest your edge by visualizing past setups to refine entries, stops, and confluences.
 
 How It Works 
 
  Set Your HTF Trigger: Choose a market event like a sweep of a high/low, pivot point, or liquidity grab on the paired higher timeframe (e.g., 1H for a 5m chart).
  
  Define Your LTF Entry: Select your entry model from a range of institutional concepts, such as Order Block, Fair Value Gap (FVG), Inverted FVG (iFVG), Breaker Block, Unicorn Model, and more, on the chart’s timeframe.
  
  Add Confluence Filters: Stack conditions like requiring an FVG + Breaker for higher-probability setups.
  
  See It on Your Chart: When a setup forms, it’s instantly plotted with Entry, Stop Loss, and Take Profit levels based on your Risk-to-Reward ratio.
 
  
 Key Features 
 
  Multi-Timeframe Sync: Pair your chart’s timeframe (e.g., 5m) with a higher timeframe (e.g., 1H) for seamless analysis.
  Institutional Tools: Supports a comprehensive suite of ICT concepts, including Order Blocks, FVGs, iFVGs, Breakers, Unicorn Model, and additional entry models.
  Custom Risk Management: Set your Stop Loss and Take Profit levels with fixed R:R or measured moves using large range of entry and stop levels.
  Session Filtering: Limit setups to specific trading sessions (e.g., London, New York) with timezone support.
  Visual Clarity: Displays HTF candles and key levels on your chart for context, with customizable colors and styles.
  Alerts: Get notified the moment a valid setup appears, even on live candles.
 
 Who It’s For 
 
  Traders who want to systematize their ICT-based strategy on a single chart.
  Those seeking to trade with discipline and avoid impulsive decisions.
  Anyone looking to backtest and optimize their setups with clear, visual feedback.
  Busy traders who need a tool to track their chart while they focus on life.
 
Why Choose My Setup  ?
 
  Save Time: Let the indicator track your chart and its paired timeframe.
  Trade Confidently: Only take A+ setups that match your exact rules.
  Learn and Improve: Analyze historical setups to refine your strategy.
 
 Disclaimer of Warranties and Limitation of Liability for  [My Setup  ] 
Please read this disclaimer carefully before using the  [My Setup  ] indicator (hereafter referred to as "the Software").
 1. No Financial Advice 
The Software is provided for educational and informational purposes only. The data, calculations, and signals generated by the Software are not, and should not be interpreted as, financial advice, investment advice, trading advice, or a recommendation or solicitation to buy, sell, or hold any security or financial instrument.
 2. Assumption of Risk You acknowledge that trading and investing are inherently risky  activities that carry a high potential for significant financial loss. All actions you take in the market, including but not limited to trade execution and risk management, are your sole responsibility. You agree to use the Software at your own sole risk. The creator shall not be held responsible or liable for any financial losses or damages you may incur as a result of using the Software.
 3. No Warranty; "AS IS" Provision 
The Software is provided "AS IS" and "AS AVAILABLE", without any warranties of any kind, either express or implied. The creator disclaims all warranties, including, but not limited to, implied warranties of merchantability, fitness for a particular purpose, accuracy, timeliness, completeness, and non-infringement.
The creator does not warrant that the Software will be error-free, uninterrupted, secure, or free of bugs, viruses, or other harmful components. You acknowledge that software is never wholly free from defects, and you are responsible for implementing your own procedures for data accuracy and security.
 4. Limitation of Liability 
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL THE CREATOR, FADI ZEIDAN, BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT, OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This limitation of liability applies to any and all damages, including but not limited to:
Direct, indirect, incidental, special, consequential, or exemplary damages.
Loss of profits, revenue, data, or use.
Financial losses resulting from trading decisions made based on the Software.
Damages arising from software defects, interruptions, or inaccuracies.
 5. Indemnification 
You agree to indemnify, defend, and hold harmless the creator, Fadi Zeidan, from and against any and all claims, liabilities, damages, losses, or expenses, including reasonable attorneys' fees and costs, arising out of or in any way connected with your access to or use of the Software.
 6. Acknowledgment and Agreement 
By accessing, installing, or using the  [My Setup  ] indicator, you acknowledge that you have read, understood, and agree to be bound by the terms of this disclaimer. If you do not agree with these terms, you must not use the Software.
TradeVision Pro - Multi-Factor Analysis System═══════════════════════════════════════════════════════════════════
TRADEVISION PRO - MULTI-FACTOR ANALYSIS SYSTEM
Created by Zakaria Safri
═══════════════════════════════════════════════════════════════════
A comprehensive technical analysis tool combining multiple factors for 
signal generation, trend analysis, and dynamic risk management visualization. 
Designed for educational purposes to study multi-factor convergence trading 
strategies across all markets and timeframes.
⚠️ IMPORTANT DISCLAIMER:
This indicator is provided for EDUCATIONAL and INFORMATIONAL purposes only.
It does NOT constitute financial advice, investment advice, or trading advice.
Past performance does not guarantee future results. Trading involves 
substantial risk of loss. Always do your own research and consult a 
financial advisor before making trading decisions.
🎯 KEY FEATURES
═══════════════════════════════════════════════════════════════════
✅ MULTI-FACTOR SIGNAL GENERATION
   • Price Volume Trend (PVT) analysis
   • Rate of Change (ROC) momentum confirmation
   • Volume-Weighted Moving Average (VWMA) trend filter
   • Simple Moving Average (SMA) price smoothing
   • Signals only when all factors align
✅ DYNAMIC RISK VISUALIZATION (Educational Only)
   • ATR-based stop loss calculation
   • Risk-reward based take profit levels (1-5 targets)
   • Visual lines and labels showing entry, SL, and TPs
   • Automatically adapts to market volatility
   • ⚠️ VISUAL REFERENCE ONLY - Does not execute trades
✅ SUPPORT & RESISTANCE DETECTION
   • Automatic pivot-based level identification
   • Red dashed lines for resistance zones
   • Green dashed lines for support areas
   • Helps identify key price levels
✅ VWMA TREND BANDS
   • Volume-weighted moving average with standard deviation
   • Color-changing bands (Green = Uptrend, Red = Downtrend)
   • Filled band area for easy visualization
   • Volume-confirmed trend strength
✅ TREND DETECTION SYSTEM
   • Counting-based trend confirmation
   • Three states: Up Trend, Down Trend, Ranging
   • Requires threshold of consecutive bars
   • Independent trend validation
✅ PRICE RANGE VISUALIZATION
   • High/Low range lines showing market structure
   • Filled area highlighting price volatility
   • Helps identify breakout zones
✅ COMPREHENSIVE INFO TABLE
   • Real-time trend status
   • Last signal type (BUY/SELL)
   • Entry price display
   • Stop loss level
   • All active take profit levels
   • Clean, professional layout
✅ OPTIONAL FEATURES
   • Bar coloring by trend direction
   • Customizable alert notifications
   • Toggle visibility for all components
   • Fully configurable parameters
📊 HOW IT WORKS
═══════════════════════════════════════════════════════════════════
SIGNAL METHODOLOGY:
BUY SIGNAL generates when ALL conditions are met:
• Smoothed price > Moving Average (upward price trend)
• PVT > PVT Average (volume supporting uptrend)
• ROC > 0 (positive momentum)
• Close > VWMA (above volume-weighted average)
SELL SIGNAL generates when ALL conditions are met:
• Smoothed price < Moving Average (downward price trend)
• PVT < PVT Average (volume supporting downtrend)
• ROC < 0 (negative momentum)
• Close < VWMA (below volume-weighted average)
This multi-factor approach filters out weak signals and waits for
strong convergence before generating alerts.
RISK CALCULATION:
Stop Loss = Entry ± (ATR × SL Multiplier)
• Uses Average True Range for volatility measurement
• Automatically adjusts to market conditions
Take Profit Levels = Entry ± (Risk Distance × TP Multiplier × Level)
• Risk Distance = |Entry - Stop Loss|
• Creates risk-reward based targets
• Example: TP Multiplier 1.0 = 1:1, 2:2, 3:3 risk-reward
⚠️ NOTE: All risk levels are VISUAL REFERENCES for educational study.
They do not execute trades automatically.
⚙️ SETTINGS GUIDE
═══════════════════════════════════════════════════════════════════
SIGNAL SETTINGS:
• Signal Length (14): Main calculation period for averages
• Smooth Length (8): Price data smoothing period
• PVT Length (14): Price Volume Trend calculation period
• ROC Length (9): Rate of Change momentum period
RISK MANAGEMENT (Visual Only):
• ATR Length (14): Volatility measurement lookback
• SL Multiplier (2.2): Stop loss distance (× ATR)
• TP Multiplier (1.0): Risk-reward ratio per TP level
• TP Levels (1-5): Number of take profit targets to display
• Show TP/SL Lines: Toggle visual reference lines
SUPPORT & RESISTANCE:
• Pivot Lookback (10): Sensitivity for S/R detection
• Show SR: Toggle support/resistance lines
VWMA BANDS:
• VWMA Length (20): Volume-weighted average period
• Show Bands: Toggle band visibility
TREND DETECTION:
• Trend Threshold (5): Consecutive bars required for trend
PRICE LINES:
• Period (20): High/low calculation lookback
• Show: Toggle price range visualization
DISPLAY OPTIONS:
• Signals: Show/hide BUY/SELL labels
• Table: Show/hide information panel
• Color Bars: Enable trend-based bar coloring
ALERTS:
• Enable: Activate alert notifications for signals
💡 USAGE INSTRUCTIONS
═══════════════════════════════════════════════════════════════════
RECOMMENDED APPROACH:
• Works on all timeframes (1m to Monthly)
• Suitable for all markets (Stocks, Forex, Crypto, etc.)
• Best used with additional analysis and confirmation
• Always practice proper risk management
ENTRY STRATEGY:
1. Wait for BUY or SELL signal to appear
2. Check trend table for trend confirmation
3. Verify VWMA band color matches signal direction
4. Look for nearby support/resistance confluence
5. Consider entering on next candle open
6. Use visual SL level for risk management
EXIT STRATEGY:
1. Use TP levels as potential exit zones
2. Consider scaling out at multiple TP levels
3. Exit on opposite signal
4. Adjust stops as trade progresses
5. Account for spread and slippage
TREND TRADING:
• "Up Trend" → Focus on BUY signals
• "Down Trend" → Focus on SELL signals
• "Ranging" → Wait for clear trend or use range strategies
🎨 VISUAL ELEMENTS
═══════════════════════════════════════════════════════════════════
• GREEN VWMA BANDS → Bullish trend indication
• RED VWMA BANDS → Bearish trend indication
• ORANGE DASHED LINE → Entry price reference
• RED SOLID LINE → Stop loss level
• GREEN DOTTED LINES → Take profit targets
• RED DASHED LINES → Resistance levels
• GREEN DASHED LINES → Support levels
• GREY FILLED AREA → Price high/low range
• GREEN BUY LABEL → Long signal
• RED SELL LABEL → Short signal
• BLUE INFO TABLE → Current trade details
• GREEN/RED BARS → Trend direction (optional)
⚠️ IMPORTANT NOTES
═══════════════════════════════════════════════════════════════════
RISK WARNING:
• Trading involves substantial risk of loss
• You can lose more than your initial investment
• Past performance does not guarantee future results
• No indicator is 100% accurate
• Always use proper position sizing
• Never risk more than you can afford to lose
EDUCATIONAL PURPOSE:
• This tool is for learning and research
• Not a complete trading system
• Should be combined with other analysis
• Requires interpretation and context
• Test thoroughly before live use
• Consider consulting a financial advisor
TECHNICAL LIMITATIONS:
• Signals lag price action (all indicators lag)
• False signals occur in choppy markets
• Works better in trending conditions
• Support/resistance levels are approximate
• TP/SL levels are suggestions, not guarantees
📚 METHODOLOGY
═══════════════════════════════════════════════════════════════════
This indicator combines established technical analysis concepts:
• Price Volume Trend (PVT): Volume-weighted price momentum
• Rate of Change (ROC): Momentum measurement
• Volume-Weighted Moving Average (VWMA): Trend identification
• Average True Range (ATR): Volatility measurement (J. Welles Wilder)
• Pivot Points: Support/resistance detection
All methods are based on publicly available technical analysis
principles. No proprietary or "secret" algorithms are used.
⚖️ FULL DISCLAIMER
═══════════════════════════════════════════════════════════════════
LIABILITY:
The creator (Zakaria Safri) assumes NO liability for:
• Trading losses or damages of any kind
• Loss of capital or profits
• Incorrect signal interpretation
• Technical issues, bugs, or errors
• Any consequences of using this tool
USER RESPONSIBILITY:
By using this indicator, you acknowledge that:
• You are solely responsible for your trading decisions
• You understand the substantial risks involved
• You will not hold the creator liable for losses
• You will conduct your own research and analysis
• You may consult a licensed financial professional
• You are using this tool entirely at your own risk
AS-IS PROVISION:
This indicator is provided "AS IS" without warranty of any kind,
express or implied, including but not limited to warranties of
merchantability, fitness for a particular purpose, or non-infringement.
The creator is not a registered investment advisor, financial planner,
or broker-dealer. This tool is not approved or endorsed by any
financial authority.
📞 ABOUT THE CREATOR
═══════════════════════════════════════════════════════════════════
Created by: Zakaria Safri
Specialization: Technical analysis indicator development
Focus: Multi-factor analysis, risk visualization, trend detection
This is an educational tool designed to demonstrate technical
analysis concepts and multi-factor signal generation methods.
📋 VERSION INFO
═══════════════════════════════════════════════════════════════════
Version: 1.0
Platform: TradingView Pine Script v5
License: Mozilla Public License 2.0
Creator: Zakaria Safri
Year: 2024
═══════════════════════════════════════════════════════════════════
Study Carefully, Trade Wisely, Manage Risk Properly
TradeVision Pro - Educational Trading Tool
Created by Zakaria Safri
═══════════════════════════════════════════════════════════════════
BOCS Channel Scalper Strategy - Automated Mean Reversion System# BOCS Channel Scalper Strategy - Automated Mean Reversion System 
 ## WHAT THIS STRATEGY DOES: 
This is an automated mean reversion trading strategy that identifies consolidation channels through volatility analysis and executes scalp trades when price enters entry zones near channel boundaries. Unlike breakout strategies, this system assumes price will revert to the channel mean, taking profits as price bounces back from extremes. Position sizing is fully customizable with three methods: fixed contracts, percentage of equity, or fixed dollar amount. Stop losses are placed just outside channel boundaries with take profits calculated either as fixed points or as a percentage of channel range.
 ## KEY DIFFERENCE FROM ORIGINAL BOCS: 
**This strategy is designed for traders seeking higher trade frequency.** The original BOCS indicator trades breakouts OUTSIDE channels, waiting for price to escape consolidation before entering. This scalper version trades mean reversion INSIDE channels, entering when price reaches channel extremes and betting on a bounce back to center. The result is significantly more trading opportunities:
- **Original BOCS**: 1-3 signals per channel (only on breakout)
- **Scalper Version**: 5-15+ signals per channel (every touch of entry zones)
- **Trade Style**: Mean reversion vs trend following
- **Hold Time**: Seconds to minutes vs minutes to hours
- **Best Markets**: Ranging/choppy conditions vs trending breakouts
This makes the scalper ideal for active day traders who want continuous opportunities within consolidation zones rather than waiting for breakout confirmation. However, increased trade frequency also means higher commission costs and requires tighter risk management.
 ## TECHNICAL METHODOLOGY: 
 ### Price Normalization Process: 
The strategy normalizes price data to create consistent volatility measurements across different instruments and price levels. It calculates the highest high and lowest low over a user-defined lookback period (default 100 bars). Current close price is normalized using: (close - lowest_low) / (highest_high - lowest_low), producing values between 0 and 1 for standardized volatility analysis.
 ### Volatility Detection: 
A 14-period standard deviation is applied to the normalized price series to measure price deviation from the mean. Higher standard deviation values indicate volatility expansion; lower values indicate consolidation. The strategy uses ta.highestbars() and ta.lowestbars() to identify when volatility peaks and troughs occur over the detection period (default 14 bars).
 ### Channel Formation Logic: 
When volatility crosses from a high level to a low level (ta.crossover(upper, lower)), a consolidation phase begins. The strategy tracks the highest and lowest prices during this period, which become the channel boundaries. Minimum duration of 10+ bars is required to filter out brief volatility spikes. Channels are rendered as box objects with defined upper and lower boundaries, with colored zones indicating entry areas.
 ### Entry Signal Generation: 
The strategy uses immediate touch-based entry logic. Entry zones are defined as a percentage from channel edges (default 20%):
- **Long Entry Zone**: Bottom 20% of channel (bottomBound + channelRange × 0.2)
- **Short Entry Zone**: Top 20% of channel (topBound - channelRange × 0.2)
Long signals trigger when candle low touches or enters the long entry zone. Short signals trigger when candle high touches or enters the short entry zone. This captures mean reversion opportunities as price reaches channel extremes.
 ### Cooldown Filter: 
An optional cooldown period (measured in bars) prevents signal spam by enforcing minimum spacing between consecutive signals. If cooldown is set to 3 bars, no new long signal will fire until 3 bars after the previous long signal. Long and short cooldowns are tracked independently, allowing both directions to signal within the same period.
 ### ATR Volatility Filter: 
The strategy includes a multi-timeframe ATR filter to avoid trading during low-volatility conditions. Using request.security(), it fetches ATR values from a specified timeframe (e.g., 1-minute ATR while trading on 5-minute charts). The filter compares current ATR to a user-defined minimum threshold:
- If ATR ≥ threshold: Trading enabled
- If ATR < threshold: No signals fire
This prevents entries during dead zones where mean reversion is unreliable due to insufficient price movement.
 ### Take Profit Calculation: 
Two TP methods are available:
 **Fixed Points Mode**:  
- Long TP = Entry + (TP_Ticks × syminfo.mintick)
- Short TP = Entry - (TP_Ticks × syminfo.mintick)
 **Channel Percentage Mode**: 
- Long TP = Entry + (ChannelRange × TP_Percent)
- Short TP = Entry - (ChannelRange × TP_Percent)
Default 50% targets the channel midline, a natural mean reversion target. Larger percentages aim for opposite channel edge.
 ### Stop Loss Placement:
 Stop losses are placed just outside the channel boundary by a user-defined tick offset:
- Long SL = ChannelBottom - (SL_Offset_Ticks × syminfo.mintick)
- Short SL = ChannelTop + (SL_Offset_Ticks × syminfo.mintick)
This logic assumes channel breaks invalidate the mean reversion thesis. If price breaks through, the range is no longer valid and position exits.
 ### Trade Execution Logic: 
When entry conditions are met (price in zone, cooldown satisfied, ATR filter passed, no existing position):
1. Calculate entry price at zone boundary
2. Calculate TP and SL based on selected method
3. Execute strategy.entry() with calculated position size
4. Place strategy.exit() with TP limit and SL stop orders
5. Update info table with active trade details
The strategy enforces one position at a time by checking strategy.position_size == 0 before entry.
 ### Channel Breakout Management: 
Channels are removed when price closes more than 10 ticks outside boundaries. This tolerance prevents premature channel deletion from minor breaks or wicks, allowing the mean reversion setup to persist through small boundary violations.
 ### Position Sizing System: 
Three methods calculate position size:
 **Fixed Contracts**:  
- Uses exact contract quantity specified in settings
- Best for futures traders (e.g., "trade 2 NQ contracts")
 **Percentage of Equity**: 
- position_size = (strategy.equity × equity_pct / 100) / close
- Dynamically scales with account growth
 **Cash Amount**: 
- position_size = cash_amount / close  
- Maintains consistent dollar exposure regardless of price
 ## INPUT PARAMETERS: 
 ### Position Sizing: 
- **Position Size Type**: Choose Fixed Contracts, % of Equity, or Cash Amount
- **Number of Contracts**: Fixed quantity per trade (1-1000)
- **% of Equity**: Percentage of account to allocate (1-100%)
- **Cash Amount**: Dollar value per position ($100+)
 ### Channel Settings: 
- **Nested Channels**: Allow multiple overlapping channels vs single channel
- **Normalization Length**: Lookback for high/low calculation (1-500, default 100)
- **Box Detection Length**: Period for volatility detection (1-100, default 14)
 ### Scalping Settings: 
- **Enable Long Scalps**: Toggle long entries on/off
- **Enable Short Scalps**: Toggle short entries on/off
- **Entry Zone % from Edge**: Size of entry zone (5-50%, default 20%)
- **SL Offset (Ticks)**: Distance beyond channel for stop (1+, default 5)
- **Cooldown Period (Bars)**: Minimum spacing between signals (0 = no cooldown)
 ### ATR Filter: 
- **Enable ATR Filter**: Toggle volatility filter on/off
- **ATR Timeframe**: Source timeframe for ATR (1, 5, 15, 60 min, etc.)
- **ATR Length**: Smoothing period (1-100, default 14)
- **Min ATR Value**: Threshold for trade enablement (0.1+, default 10.0)
 ### Take Profit Settings: 
- **TP Method**: Choose Fixed Points or % of Channel
- **TP Fixed (Ticks)**: Static distance in ticks (1+, default 30)
- **TP % of Channel**: Dynamic target as channel percentage (10-100%, default 50%)
 ### Appearance: 
- **Show Entry Zones**: Toggle zone labels on channels
- **Show Info Table**: Display real-time strategy status
- **Table Position**: Corner placement (Top Left/Right, Bottom Left/Right)
- **Color Settings**: Customize long/short/TP/SL colors
 ## VISUAL INDICATORS: 
- **Channel boxes** with semi-transparent fill showing consolidation zones
- **Colored entry zones** labeled "LONG ZONE ▲" and "SHORT ZONE ▼"
- **Entry signal arrows** below/above bars marking long/short entries
- **Active TP/SL lines** with emoji labels (⊕ Entry, 🎯 TP, 🛑 SL)
- **Info table** showing position status, channel state, last signal, entry/TP/SL prices, and ATR status
 ## HOW TO USE: 
### For 1-3 Minute Scalping (NQ/ES):
- ATR Timeframe: "1" (1-minute)
- ATR Min Value: 10.0 (for NQ), adjust per instrument
- Entry Zone %: 20-25%
- TP Method: Fixed Points, 20-40 ticks
- SL Offset: 5-10 ticks
- Cooldown: 2-3 bars
- Position Size: 1-2 contracts
 ### For 5-15 Minute Day Trading: 
- ATR Timeframe: "5" or match chart
- ATR Min Value: Adjust to instrument (test 8-15 for NQ)
- Entry Zone %: 20-30%
- TP Method: % of Channel, 40-60%
- SL Offset: 5-10 ticks
- Cooldown: 3-5 bars
- Position Size: Fixed contracts or 5-10% equity
 ### For 30-60 Minute Swing Scalping: 
- ATR Timeframe: "15" or "30"
- ATR Min Value: Lower threshold for broader market
- Entry Zone %: 25-35%
- TP Method: % of Channel, 50-70%
- SL Offset: 10-15 ticks
- Cooldown: 5+ bars or disable
- Position Size: % of equity recommended
 ## BACKTEST CONSIDERATIONS: 
- Strategy performs best in ranging, mean-reverting markets
- Strong trending markets produce more stop losses as price breaks channels
- ATR filter significantly reduces trade count but improves quality during low volatility
- Cooldown period trades signal quantity for signal quality
- Commission and slippage materially impact sub-5-minute timeframe performance
- Shorter timeframes require tighter entry zones (15-20%) to catch quick reversions
- % of Channel TP adapts better to varying channel sizes than fixed points
- Fixed contract sizing recommended for consistent risk per trade in futures
 **Backtesting Parameters Used**:  This strategy was developed and tested using realistic commission and slippage values to provide accurate performance expectations. Recommended settings: Commission of $1.40 per side (typical for NQ futures through discount brokers), slippage of 2 ticks to account for execution delays on fast-moving scalp entries. These values reflect real-world trading costs that active scalpers will encounter. Backtest results without proper cost simulation will significantly overstate profitability.
 ## COMPATIBLE MARKETS: 
Works on any instrument with price data including stock indices (NQ, ES, YM, RTY), individual stocks, forex pairs (EUR/USD, GBP/USD), cryptocurrency (BTC, ETH), and commodities. Volume-based features require data feed with volume information but are optional for core functionality.
 ## KNOWN LIMITATIONS: 
- Immediate touch entry can fire multiple times in choppy zones without adequate cooldown
- Channel deletion at 10-tick breaks may be too aggressive or lenient depending on instrument tick size
- ATR filter from lower timeframes requires higher-tier TradingView subscription (request.security limitation)
- Mean reversion logic fails in strong breakout scenarios leading to stop loss hits
- Position sizing via % of equity or cash amount calculates based on close price, may differ from actual fill price
- No partial closing capability - full position exits at TP or SL only
- Strategy does not account for gap openings or overnight holds
 ## RISK DISCLOSURE: 
Trading involves substantial risk of loss. Past performance does not guarantee future results. This strategy is for educational purposes and backtesting only. Mean reversion strategies can experience extended drawdowns during trending markets. Stop losses may not fill at intended levels during extreme volatility or gaps. Thoroughly test on historical data and paper trade before risking real capital. Use appropriate position sizing and never risk more than you can afford to lose. Consider consulting a licensed financial advisor before making trading decisions. Automated trading systems can malfunction - monitor all live positions actively.
 ## ACKNOWLEDGMENT & CREDITS: 
This strategy is built upon the channel detection methodology created by **AlgoAlpha** in the "Smart Money Breakout Channels" indicator. Full credit and appreciation to AlgoAlpha for pioneering the normalized volatility approach to identifying consolidation patterns. The core channel formation logic using normalized price standard deviation is AlgoAlpha's original contribution to the TradingView community.
Enhancements to the original concept include: mean reversion entry logic (vs breakout), immediate touch-based signals, multi-timeframe ATR volatility filtering, flexible position sizing (fixed/percentage/cash), cooldown period filtering, dual TP methods (fixed points vs channel percentage), automated strategy execution with exit management, and real-time position monitoring table.
BOCS AdaptiveBOCS Adaptive Strategy - Automated Volatility Breakout System
WHAT THIS STRATEGY DOES:
This is an automated trading strategy that detects consolidation patterns through volatility analysis and executes trades when price breaks out of these channels. Take-profit and stop-loss levels are calculated dynamically using Average True Range (ATR) to adapt to current market volatility. The strategy closes positions partially at the first profit target and exits the remainder at the second target or stop loss.
TECHNICAL METHODOLOGY:
Price Normalization Process:
The strategy begins by normalizing price to create a consistent measurement scale. It calculates the highest high and lowest low over a user-defined lookback period (default 100 bars). The current close price is then normalized using the formula: (close - lowest_low) / (highest_high - lowest_low). This produces values between 0 and 1, allowing volatility analysis to work consistently across different instruments and price levels.
Volatility Detection:
A 14-period standard deviation is applied to the normalized price series. Standard deviation measures how much prices deviate from their average - higher values indicate volatility expansion, lower values indicate consolidation. The strategy uses ta.highestbars() and ta.lowestbars() functions to track when volatility reaches peaks and troughs over the detection length period (default 14 bars).
Channel Formation Logic:
When volatility crosses from a high level to a low level, this signals the beginning of a consolidation phase. The strategy records this moment using ta.crossover(upper, lower) and begins tracking the highest and lowest prices during the consolidation. These become the channel boundaries. The duration between the crossover and current bar must exceed 10 bars minimum to avoid false channels from brief volatility spikes. Channels are drawn using box objects with the recorded high/low boundaries.
Breakout Signal Generation:
Two detection modes are available:
Strong Closes Mode (default): Breakout occurs when the candle body midpoint math.avg(close, open) exceeds the channel boundary. This filters out wick-only breaks.
Any Touch Mode: Breakout occurs when the close price exceeds the boundary.
When price closes above the upper channel boundary, a bullish breakout signal generates. When price closes below the lower boundary, a bearish breakout signal generates. The channel is then removed from the chart.
ATR-Based Risk Management:
The strategy uses request.security() to fetch ATR values from a specified timeframe, which can differ from the chart timeframe. For example, on a 5-minute chart, you can use 1-minute ATR for more responsive calculations. The ATR is calculated using ta.atr(length) with a user-defined period (default 14).
Exit levels are calculated at the moment of breakout:
Long Entry Price = Upper channel boundary
Long TP1 = Entry + (ATR × TP1 Multiplier)
Long TP2 = Entry + (ATR × TP2 Multiplier)
Long SL = Entry - (ATR × SL Multiplier)
For short trades, the calculation inverts:
Short Entry Price = Lower channel boundary
Short TP1 = Entry - (ATR × TP1 Multiplier)
Short TP2 = Entry - (ATR × TP2 Multiplier)
Short SL = Entry + (ATR × SL Multiplier)
Trade Execution Logic:
When a breakout occurs, the strategy checks if trading hours filter is satisfied (if enabled) and if position size equals zero (no existing position). If volume confirmation is enabled, it also verifies that current volume exceeds 1.2 times the 20-period simple moving average.
If all conditions are met:
strategy.entry() opens a position using the user-defined number of contracts
strategy.exit() immediately places a stop loss order
The code monitors price against TP1 and TP2 levels on each bar
When price reaches TP1, strategy.close() closes the specified number of contracts (e.g., if you enter with 3 contracts and set TP1 close to 1, it closes 1 contract). When price reaches TP2, it closes all remaining contracts. If stop loss is hit first, the entire position exits via the strategy.exit() order.
Volume Analysis System:
The strategy uses ta.requestUpAndDownVolume(timeframe) to fetch up volume, down volume, and volume delta from a specified timeframe. Three display modes are available:
Volume Mode: Shows total volume as bars scaled relative to the 20-period average
Comparison Mode: Shows up volume and down volume as separate bars above/below the channel midline
Delta Mode: Shows net volume delta (up volume - down volume) as bars, positive values above midline, negative below
The volume confirmation logic compares breakout bar volume to the 20-period SMA. If volume ÷ average > 1.2, the breakout is classified as "confirmed." When volume confirmation is enabled in settings, only confirmed breakouts generate trades.
INPUT PARAMETERS:
Strategy Settings:
Number of Contracts: Fixed quantity to trade per signal (1-1000)
Require Volume Confirmation: Toggle to only trade signals with volume >120% of average
TP1 Close Contracts: Exact number of contracts to close at first target (1-1000)
Use Trading Hours Filter: Toggle to restrict trading to specified session
Trading Hours: Session input in HHMM-HHMM format (e.g., "0930-1600")
Main Settings:
Normalization Length: Lookback bars for high/low calculation (1-500, default 100)
Box Detection Length: Period for volatility peak/trough detection (1-100, default 14)
Strong Closes Only: Toggle between body midpoint vs close price for breakout detection
Nested Channels: Allow multiple overlapping channels vs single channel at a time
ATR TP/SL Settings:
ATR Timeframe: Source timeframe for ATR calculation (1, 5, 15, 60, etc.)
ATR Length: Smoothing period for ATR (1-100, default 14)
Take Profit 1 Multiplier: Distance from entry as multiple of ATR (0.1-10.0, default 2.0)
Take Profit 2 Multiplier: Distance from entry as multiple of ATR (0.1-10.0, default 3.0)
Stop Loss Multiplier: Distance from entry as multiple of ATR (0.1-10.0, default 1.0)
Enable Take Profit 2: Toggle second profit target on/off
VISUAL INDICATORS:
Channel boxes with semi-transparent fill showing consolidation zones
Green/red colored zones at channel boundaries indicating breakout areas
Volume bars displayed within channels using selected mode
TP/SL lines with labels showing both price level and distance in points
Entry signals marked with up/down triangles at breakout price
Strategy status table showing position, contracts, P&L, ATR values, and volume confirmation status
HOW TO USE:
For 2-Minute Scalping:
Set ATR Timeframe to "1" (1-minute), ATR Length to 12, TP1 Multiplier to 2.0, TP2 Multiplier to 3.0, SL Multiplier to 1.5. Enable volume confirmation and strong closes only. Use trading hours filter to avoid low-volume periods.
For 5-15 Minute Day Trading:
Set ATR Timeframe to match chart or use 5-minute, ATR Length to 14, TP1 Multiplier to 2.0, TP2 Multiplier to 3.5, SL Multiplier to 1.2. Volume confirmation recommended but optional.
For Hourly+ Swing Trading:
Set ATR Timeframe to 15-30 minute, ATR Length to 14-21, TP1 Multiplier to 2.5, TP2 Multiplier to 4.0, SL Multiplier to 1.5. Volume confirmation optional, nested channels can be enabled for multiple setups.
BACKTEST CONSIDERATIONS:
Strategy performs best during trending or volatility expansion phases
Consolidation-heavy or choppy markets produce more false signals
Shorter timeframes require wider stop loss multipliers due to noise
Commission and slippage significantly impact performance on sub-5-minute charts
Volume confirmation generally improves win rate but reduces trade frequency
ATR multipliers should be optimized for specific instrument characteristics
COMPATIBLE MARKETS:
Works on any instrument with price and volume data including forex pairs, stock indices, individual stocks, cryptocurrency, commodities, and futures contracts. Requires TradingView data feed that includes volume for volume confirmation features to function.
KNOWN LIMITATIONS:
Stop losses execute via strategy.exit() and may not fill at exact levels during gaps or extreme volatility
request.security() on lower timeframes requires higher-tier TradingView subscription
False breakouts inherent to breakout strategies cannot be completely eliminated
Performance varies significantly based on market regime (trending vs ranging)
Partial closing logic requires sufficient position size relative to TP1 close contracts setting
RISK DISCLOSURE:
Trading involves substantial risk of loss. Past performance of this or any strategy does not guarantee future results. This strategy is provided for educational purposes and automated backtesting. Thoroughly test on historical data and paper trade before risking real capital. Market conditions change and strategies that worked historically may fail in the future. Use appropriate position sizing and never risk more than you can afford to lose. Consider consulting a licensed financial advisor before making trading decisions.
ACKNOWLEDGMENT & CREDITS:
This strategy is built upon the channel detection methodology created by AlgoAlpha in the "Smart Money Breakout Channels" indicator. Full credit and appreciation to AlgoAlpha for pioneering the normalized volatility approach to identifying consolidation patterns and sharing this innovative technique with the TradingView community. The enhancements added to the original concept include automated trade execution, multi-timeframe ATR-based risk management, partial position closing by contract count, volume confirmation filtering, and real-time position monitoring.
BookYourTradeHappy trade,
This is a semi-automated tool that allows you to define a trade setup in advance, including multiple exit levels. It incorporates a proven method for managing risk and reward. You specify a fixed entry price, an initial stop loss, two take profit levels, and a trailing stop loss for the remaining position—aiming to maximize gains from the trend. Alerts are included so you can step away from the screen and still be notified when any predefined price level is reached. The tool sends trade orders as market orders to your exchange or broker via webhooks. You provide the general webhook format, and the script automatically fills in the correct values.
 How to Use 
This tool is intended for manual day traders.
 Define Entry Conditions: 
Set your planned entry price and, optionally, a start and end time for trade activation. The script will not run unless the price reaches your specified level during this time window.
 Set Stop Loss: 
Define the stop loss as a fixed number of points from the entry price (above or below). This also determines whether the trade is long or short.
 Configure Take Profits: 
Specify the risk-reward ratio and position size for Take Profit 1.
Do the same for Take Profit 2.
 Trailing Stop Loss: 
For the remaining position after Take Profit 2, set a trailing stop loss. This is also defined in points, relative to the previous bar's closing price.
 Time and Session Filters: 
Set the earliest date to begin trading and the latest date by which all positions should be closed.
Optionally, define specific time windows (daily and or weekly) during which trading should be disabled. These off-times will be visually grayed out.
 Define Capital and Fees: 
Input the dollar amount you want to invest, along with any applicable percentage-based fees or fixed fees per trade. This is useful since different brokers, exchanges, or webhook service providers may charge in different ways (fixed, percentage, or both).
 Configure Webhooks: 
Enter your broker- or exchange-specific webhook for each trade event: entry, Take Profit 1, Take Profit 2, Stop Loss, and trailing exit. You’ll need to include placeholder strings in the webhook that the script will replace with actual trade values. The script provides a helper table to display these placeholders directly on the chart. 
Some values you can deliver to the webhook service provider as an $ value or a deviation in percentage. For example the quantity of a trade or the take profit price. choose the correct replacement accordingly.
The script sends all orders as market orders.
 Multiple Instances: 
If you want to run multiple instances of this script, you must assign a unique name to each one. This ensures that the webhook service provider can correctly route trade signals to the appropriate bot. 
Here is an evolution of one trade in images:
The trade setting are defined but the trade has not started
The trade has started
The price reached the first take profit level and a part of the investment was liquidated.
The trade reached it's end date and the remaining investment was liquidated.
cheers
SuperTrend - Dynamic Lines and ChannelsSuperTrend Indicator: Comprehensive Description 
 Overview 
The SuperTrend indicator is Pine Script V6 designed for TradingView to plot dynamic trend lines & channels across multiple timeframes (Daily, Weekly, Monthly, Quarterly, and Yearly/All-Time) to assist traders in identifying potential support, resistance, and trend continuation levels. The script calculates trendlines based on high and low prices over specified periods, projects these trendlines forward, and includes optional reflection channels and heartlines to provide additional context for price action analysis. The indicator is highly customizable, allowing users to toggle the visibility of trendlines, projections, and heartlines for each timeframe, with a focus on the DayTrade channel, which includes unique reflection channel features.
This description provides a detailed explanation of the indicator’s features, functionality, and display, with a specific focus on the DayTrade channel’s anchoring, the role of static and dynamic channels in projecting future price action, the heartline’s potential as a volume indicator, and how traders can use the indicator for line-to-line trading strategies.
 Features and Functionality 
 1. Dynamic Trend Channels 
The SuperTrend indicator calculates trend channels for five timeframes:
 
 DayTrade Channel: Tracks daily highs and lows, updating before 12 PM each trading day.
 Weekly Channel: Tracks highs and lows over a user-selected period (1, 2, or 3 weeks).
 Monthly Channel: Tracks monthly highs and lows.
 Quarterly Channel: Tracks highs and lows over a user-selected period (1 or 2 quarters).
 Yearly/All-Time Channel: Tracks highs and lows over a user-selected period (1 to 10 years or All Time).
 
Each channel consists of:
 
 Upper Trendline: Connects the high prices of the previous and current periods.
 Lower Trendline: Connects the low prices of the previous and current periods.
 Projections: Extends the trendlines forward based on the trend’s slope.
 Heartline: A dashed line drawn at the midpoint between the upper and lower trendlines or their projections.
 
 DayTrade Channel Anchoring 
The DayTrade channel anchors its trendlines to the high and low prices of the previous and current trading days, with updates restricted to before 12 PM to capture significant price movements during the morning session, which is often more volatile due to market openings or news events. The "Show DayTrade Trend Lines" toggle enables this channel, and after 12 PM, the trendlines and projections remain static for the rest of the trading day. This static anchoring provides a consistent reference for potential support and resistance levels, allowing traders to anticipate price reactions based on historical highs and lows from the previous day and the morning session of the current day.
The static nature of the DayTrade channel after 12 PM ensures that the trendlines and projections do not shift mid-session, providing a stable framework for traders to assess whether price action respects or breaks these levels, potentially indicating trend continuation or reversal.
 Static vs. Dynamic Channels 
 
 Static Channels: Once set (e.g., after 12 PM for the DayTrade channel or at the start of a new period for other timeframes), the trendlines remain fixed until the next period begins. This static behavior allows traders to use the channels as reference levels for potential price targets or reversal points, as they are based on historical price extremes.
 Dynamic Projections: The projections extend the trendlines forward, providing a visual guide for potential future price action, assuming the trend’s momentum continues. When a trendline is broken (e.g., price closes above the upper projection or below the lower projection), it may suggest a breakout or reversal, prompting traders to reassess their positions.
 
 2. Reflection Channels (DayTrade Only) 
The DayTrade channel includes optional lower and upper reflection channels, which are additional trendlines positioned symmetrically around the main channel to provide extended support and resistance zones. These are controlled by the "Show Reflection Channel" dropdown.
 
 Lower Reflection Channel:
 
 Position: Drawn below the lower trendline at a distance equal to the range between the upper and lower trendlines.
 Projection: Extends forward as a dashed line.
 Heartline: A dashed line drawn at the midpoint between the lower trendline and the lower reflection trendline, controlled by the "Show Lower Reflection Heartline" toggle.
 
 Upper Reflection Channel:
 
 Position: Drawn above the upper trendline at the same distance as the main channel’s range.
 Projection: Extends forward as a dashed line.
 Heartline: A dashed line drawn at the midpoint between the upper trendline and the upper reflection trendline, controlled by the "Show Upper Reflection Heartline" toggle.
 
 Display Control: The "Show Reflection Channel" dropdown allows users to select:
 
 "None": No reflection channels are shown.
 "Lower": Only the lower reflection channel is shown.
 "Upper": Only the upper reflection channel is shown.
 "Both": Both reflection channels are shown.
 
 Purpose: Reflection channels extend the price range analysis by providing additional levels where price may react, acting as potential targets or reversal zones after breaking the main trendlines.
 
 3. Heartlines 
Each timeframe, including the DayTrade channel and its reflection channels, can display a heartline, which is a dashed line plotted at the midpoint between the upper and lower trendlines or their projections. For the DayTrade channel:
 
 Main DayTrade Heartline: Midpoint between the upper and lower trendlines, controlled by the "Show DayTrade Heartline" toggle.
 Lower Reflection Heartline: Midpoint between the lower trendline and the lower reflection trendline, controlled by the "Show Lower Reflection Heartline" toggle.
 Upper Reflection Heartline: Midpoint between the upper trendline and the upper reflection trendline, controlled by the "Show Upper Reflection Heartline" toggle.
 Independent Toggles: Visibility is controlled by:
 
 "Show DayTrade Heartline": For the main DayTrade heartline.
 "Show Lower Reflection Heartline": For the lower reflection heartline.
 "Show Upper Reflection Heartline": For the upper reflection heartline.
 
 Potential Volume Indicator: The heartline represents the average price level between the high and low of a period, which may correlate with areas of high trading activity or volume concentration, as these midpoints often align with price levels where buyers and sellers have historically converged. A break above or below the heartline, especially with strong momentum, may indicate a shift in market sentiment, potentially leading to accelerated price movement in the direction of the break. However, this is an observation based on the heartline’s position, not a direct measure of volume, as the script does not incorporate volume data.
 
 4. Alerts 
The script includes alert conditions for all timeframes, triggered when a candle closes fully above the upper projection or below the lower projection. For the DayTrade channel:
 
 Upper Trend Break: Triggers when a candle closes fully above the upper projection.
 Lower Trend Break: Triggers when a candle closes fully below the lower projection.
 Alerts are combined across all timeframes, so a break in any timeframe triggers a general "Upper Trend Break" or "Lower Trend Break" alert with the message: "Candle closed fully above/below one or more projection lines." Alerts fire once per bar close.
 
 5. Customization Options 
The script provides extensive customization through input settings, grouped by timeframe:
 
 DayTrade Channel:
 
 "Show DayTrade Trend Lines": Toggle main trendlines and projections.
 "Show DayTrade Heartline": Toggle main heartline.
 "Show Lower Reflection Heartline": Toggle lower reflection heartline.
 "Show Upper Reflection Heartline": Toggle upper reflection heartline.
 "DayTrade Channel Color": Set color for trendlines.
 "DayTrade Projection Channel Color": Set color for projections.
 "Heartline Color": Set color for all heartlines.
 "Show Reflection Channel": Dropdown to show "None," "Lower," "Upper," or "Both" reflection channels.
 
 Other Timeframes (Weekly, Monthly, Quarterly, Yearly/All-Time):
 
 Toggles for trendlines (e.g., "Show Weekly Trend Lines," "Show Monthly Trend Lines") and heartlines (e.g., "Show Weekly Heartline," "Show Monthly Heartline").
 Period selection (e.g., "Weekly Period" for 1, 2, or 3 weeks; "Yearly Period" for 1 to 10 years or All Time).
 Separate colors for trendlines (e.g., "Weekly Channel Color"), projections (e.g., "Weekly Projection Channel Color"), and heartlines (e.g., "Weekly Heartline Color").
 
 Max Bar Difference: Limits the distance between anchor points to ensure relevance to recent price action.
 
 Display 
The indicator overlays the following elements on the chart:
 
 Trendlines: Solid lines connecting the high and low anchor points for each timeframe, using user-specified colors (e.g., set via "DayTrade Channel Color").
 Projections: Dashed lines extending from the current anchor points, indicating potential future price levels, using colors set via "DayTrade Projection Channel Color" or equivalent.
 Heartlines: Dashed lines at the midpoint of each channel, using the color set via "Heartline Color" or equivalent.
 Reflection Channels (DayTrade Only):
 
 Lower reflection trendline and projection: Below the lower trendline, using the same colors as the main channel.
 Upper reflection trendline and projection: Above the upper trendline, using the same colors.
 Reflection heartlines: Midpoints between the main trendlines and their respective reflection trendlines, using the "Heartline Color."
 
 Visual Clarity: Lines are only drawn if the relevant toggles (e.g., "Show DayTrade Trend Lines") are enabled and data is available. Lines are deleted when their conditions are not met to avoid clutter.
 
 Trading Applications: Line-to-Line Trading 
The SuperTrend indicator can be used to inform trading decisions by providing a framework for line-to-line trading, where traders use the trendlines, projections, and heartlines as reference points for entries, exits, and risk management. Below is a detailed explanation of how to use the DayTrade channel and its reflection channels for trading, focusing on their anchoring, static/dynamic behavior, and the heartline’s role.
 1. Why DayTrade Channel Anchoring 
The DayTrade channel’s anchoring to the previous day’s high/low and the current day’s high/low before 12 PM, controlled by the "Show DayTrade Trend Lines" toggle, captures significant price levels during high-volatility periods:
 
 Previous Day High/Low: These represent key levels where price found resistance (high) or support (low) in the prior session, often acting as psychological or technical barriers in the current session.
 Current Day High/Low Before 12 PM: The morning session (before 12 PM) often sees increased volatility due to market openings, news releases, or institutional activity. Anchoring to these early highs/lows ensures the channel reflects the most relevant price extremes, which are likely to influence intraday price action.
 Static After 12 PM: By fixing the anchor points after 12 PM, the trendlines and projections become stable references for the afternoon session, allowing traders to anticipate price reactions at these levels without the lines shifting unexpectedly.
 
This anchoring makes the DayTrade channel particularly useful for intraday traders, as it provides a consistent framework based on recent price history, which can guide decisions on trend continuation or reversal.
 2. Using Static Channels and Projections 
The static nature of the DayTrade channel after 12 PM, enabled by "Show DayTrade Trend Lines," and the dynamic projections, set via "DayTrade Projection Channel Color," provide a structured approach to trading:
 
 Support and Resistance:
 
 The upper trendline and lower trendline act as dynamic support/resistance levels based on the previous and current day’s price extremes.
 Traders may observe price reactions (e.g., bounces or breaks) at these levels. For example, if price approaches the lower trendline and bounces, it may indicate support, suggesting a potential long entry.
 
 Projections as Price Targets:
 
 The projections extend the trendlines forward, offering potential price targets if the trend continues. For instance, if price breaks above the upper trendline and continues toward the upper projection, traders might consider it a bullish continuation signal.
 A candle closing fully above the upper projection or below the lower projection (triggering an alert) may indicate a breakout, prompting traders to enter in the direction of the break or reassess if the break fails.
 
 Static Channels for Breakouts:
 
 Because the trendlines are static after 12 PM, they serve as fixed reference points. A break above the upper trendline or its projection may suggest bullish momentum, while a break below the lower trendline or projection may indicate bearish momentum.
 Traders can use these breaks to set entry points (e.g., entering a long position after a confirmed break above the upper projection) and place stop-losses below the broken level to manage risk.
 
 
 3. Line-to-Line Trading Strategy 
Line-to-line trading involves using the trendlines, projections, and reflection channels as sequential price targets or reversal zones:
 
 Trading Within the Main Channel:
 
 Long Setup: If price bounces off the lower trendline and moves toward the heartline (enabled by "Show DayTrade Heartline") or upper trendline, traders might enter a long position near the lower trendline, targeting the heartline or upper trendline for profit-taking. A stop-loss could be placed below the lower trendline to protect against a breakdown.
 Short Setup: If price rejects from the upper trendline and moves toward the heartline or lower trendline, traders might enter a short position near the upper trendline, targeting the heartline or lower trendline, with a stop-loss above the upper trendline.
 
 Trading to Reflection Channels:
 
 If price breaks above the upper trendline and continues toward the upper reflection trendline or its projection (enabled by "Show Reflection Channel" set to "Upper" or "Both"), traders might treat this as a breakout trade, entering long with a target at the upper reflection level and a stop-loss below the upper trendline.
 Similarly, a break below the lower trendline toward the lower reflection trendline or its projection (enabled by "Show Reflection Channel" set to "Lower" or "Both") could signal a short opportunity, with a target at the lower reflection level and a stop-loss above the lower trendline.
 
 Reversal Trades:
 
 If price reaches the upper reflection trendline and shows signs of rejection (e.g., a bearish candlestick pattern), traders might consider a short position, anticipating a move back toward the main channel’s upper trendline or heartline.
 Conversely, a rejection at the lower reflection trendline could prompt a long position targeting the lower trendline or heartline.
 
 Risk Management:
 
 Use the heartline as a midpoint to gauge whether price is likely to continue toward the opposite trendline or reverse. For example, a failure to break above the heartline after bouncing from the lower trendline might suggest weakening bullish momentum, prompting a tighter stop-loss.
 The static nature of the channels after 12 PM allows traders to set precise stop-loss and take-profit levels based on historical price levels, reducing the risk of chasing moving targets.
 
 
 4. Heartline as a Volume Indicator 
The heartline, controlled by toggles like "Show DayTrade Heartline," "Show Lower Reflection Heartline," and "Show Upper Reflection Heartline," may serve as an indirect proxy for areas of high trading activity:
 
 Rationale: The heartline represents the average price between the high and low of a period, which often aligns with price levels where significant buying and selling have occurred, as these midpoints can correspond to areas of consolidation or high volume in the order book. While the script does not directly use volume data, the heartline’s position may reflect price levels where market participants have historically balanced supply and demand.
 Breakout Potential: A break above or below the heartline, particularly with a strong candle (e.g., wide range or high momentum), may indicate a shift in market sentiment, potentially leading to accelerated price movement in the direction of the break. For example:
 
 A close above the main DayTrade heartline could suggest buyers are overpowering sellers, potentially leading to a move toward the upper trendline or upper reflection channel.
 A close below the heartline could indicate seller dominance, targeting the lower trendline or lower reflection channel.
 
 Trading Application:
 
 Traders might use heartline breaks as confirmation signals for trend continuation. For instance, after a bounce from the lower trendline, a close above the heartline could confirm bullish momentum, prompting a long entry.
 The heartline can also act as a dynamic stop-loss or trailing stop level. For example, in a long trade, a trader might exit if price falls below the heartline, indicating a potential reversal.
 For reflection heartlines, a break above the upper reflection heartline or below the lower reflection heartline could signal strong momentum, as these levels are further from the main channel and may require significant buying or selling pressure to breach.
 
 
 5. Practical Trading Considerations 
 
 Timeframe Context: The DayTrade channel, enabled by "Show DayTrade Trend Lines," is best suited for intraday trading due to its daily anchoring and morning update behavior. Traders should consider higher timeframe channels (e.g., enabled by "Show Weekly Trend Lines" or "Show Monthly Trend Lines") for broader context, as breaks of the DayTrade channel may align with or be influenced by larger trends.
 Confirmation Tools: Use additional indicators (e.g., RSI, MACD, or volume-based indicators) or candlestick patterns to confirm signals at trendlines, projections, or heartlines. The script’s alerts can help identify breakouts, but traders should verify with other technical or fundamental factors.
 Risk Management: Always define risk-reward ratios before entering trades. For example, a 1:2 risk-reward ratio might involve risking a stop-loss below the lower trendline to target the heartline or upper trendline.
 Market Conditions: The effectiveness of the channels and heartlines depends on market conditions (e.g., trending vs. ranging markets). In choppy markets, price may oscillate within the main channel, favoring range-bound strategies. In trending markets, breaks of projections or reflection channels may signal continuation trades.
 Limitations: The indicator relies on historical price data and does not incorporate volume, news, or other external factors. Traders should use it as part of a broader strategy and avoid relying solely on its signals.
 
 How to Use in TradingView 
 
 Add the Indicator: Copy the script into TradingView’s Pine Editor, compile it, and add it to your chart.
 Configure Settings:
 
 Enable "Show DayTrade Trend Lines" to display the main DayTrade trendlines and projections.
 Use the "Show Reflection Channel" dropdown to select "Lower," "Upper," or "Both" to display reflection channels.
 Toggle "Show DayTrade Heartline," "Show Lower Reflection Heartline," and "Show Upper Reflection Heartline" to control heartline visibility.
 Adjust colors using "DayTrade Channel Color," "DayTrade Projection Channel Color," and "Heartline Color."
 Enable other timeframes (e.g., "Show Weekly Trend Lines," "Show Monthly Trend Lines") for additional context, if desired.
 
 Set Alerts: Configure alerts in TradingView for "Upper Trend Break" or "Lower Trend Break" to receive notifications when a candle closes fully above or below any timeframe’s projections.
 Analyze the Chart:
 
 Monitor price interactions with the trendlines, projections, and heartlines.
 Look for bounces, breaks, or rejections at these levels to plan entries and exits.
 Use the heartline breaks as potential confirmation of momentum shifts.
 
 Test Strategies: Backtest line-to-line trading strategies in TradingView’s strategy tester or demo account to evaluate performance before trading with real capital.
 
 Conclusion 
The SuperTrend indicator provides a robust framework for technical analysis by plotting dynamic trend channels, projections, and heartlines across multiple timeframes, with advanced features for the DayTrade channel, including lower and upper reflection channels. The DayTrade channel’s anchoring to previous and current day highs/lows before 12 PM, enabled by "Show DayTrade Trend Lines," creates a stable reference for intraday trading, while static trendlines and dynamic projections guide traders in anticipating price movements. The heartlines, controlled by toggles like "Show DayTrade Heartline," offer potential insights into high-activity price levels, with breaks possibly indicating momentum shifts. Traders can use the indicator for line-to-line trading by targeting moves between trendlines, projections, and reflection channels, while managing risk with stop-losses and confirmations from other tools. The indicator should be used as part of a comprehensive trading plan.
[Kpt-Ahab] Simple AlgoPilot Riskmgt and Backtest Simple AlgoPilot Riskmgt and Backtest
This script provides a compact solution for automated risk management and backtesting within TradingView.
It offers the following core functionalities:
 Risk Management: 
The system integrates various risk limitation mechanisms:
Percentage-based or trailing stop-loss
Maximum losing streak limitation
Maximum drawdown limitation relative to account equity
Flexible position sizing control (based on equity, fixed size, or contracts)
Dynamic repurchasing of positions ("Repurchase") during losses with adjustable size scaling
Supports multi-stage take-profit targets (TP1/TP2) and automatic stop-loss adjustment to breakeven
 External Signal Processing for Backtesting: 
In addition to its own moving average crossovers, the script can process external trading signals:
External signals are received via a source input variable (e.g., from other indicators or signal generators)
Positive values (+1) trigger long positions, negative values (–1) trigger short positions
This allows for easy integration of other indicator-based strategies into backtests
 Additional Backtesting Features: 
Selection between different MA types (SMA, EMA, WMA, VWMA, HMA)
Flexible time filtering (trade only within defined start and end dates)
Simulation of commission costs, slippage, and leverage
Optional alert functions for moving average crossovers
Visualization of liquidation prices and portfolio development in an integrated table
Note: This script is primarily intended for strategic backtesting and risk setting optimization.
Real-time applications should be tested with caution. All order executions, alerts, and risk calculations are purely simulation-based.
 Explanation of Calculations and Logics: 
 1. Risk Management and Position Sizing: 
The position size is calculated based on the user’s choice using three possible methods:
Percentage of Equity: 
The position size is a defined fraction of the available capital, dynamically adjusted based on market price (riskPerc / close).
Fixed Size (in currency): The user defines a fixed monetary amount to be used per trade.
Contracts: A fixed number of contracts is traded regardless of the current price.
Leverage: The selected leverage multiplies the position size for margin calculations.
 2. Trade Logic and Signal Triggering: 
Trades can be triggered through two mechanisms:
Internal Signals: 
When a fast moving average crosses above or below a slower moving average (ta.crossover, ta.crossunder). The type of moving averages (SMA, EMA, WMA, VWMA, HMA) can be freely selected.
External Signals:
Signals from other indicators can be received via an input source field.
+1 triggers a long entry, –1 triggers a short entry.
Position Management:
Once entered, the position is actively managed.
Multiple take-profit targets are set.
Upon reaching a profit target, the stop-loss can optionally be moved to breakeven.
 3. Stop-Loss and Take-Profit Logic: 
Stop-Loss Types:
Fixed Percentage Stop:
A fixed distance below/above the entry price.
Trailing Stop:
Dynamically adjusts as the trade moves into profit.
Fast Trailing Stop:
A more aggressive variant of trailing that reacts quicker to price changes.
Take-Profit Management:
Two take-profit targets (TP1 and TP2) are supported, allowing partial exits at different stages.
Remaining positions can either reach the second target or be closed by the stop-loss.
 4. Repurchase Strategy ("Scaling In" on Losses): 
If a position reaches a specified loss threshold (e.g., –15%), an automatic additional purchase can occur.
The position size is increased by a configurable percentage.
Repurchases happen only if an initial position is already open.
 5. Backtesting Control and Filters: 
Time Filters:
A trading period can be defined (start and end date).
All trades outside the selected period are ignored.
Risk Filters: Trading is paused if:
A maximum losing streak is reached.
A maximum allowed drawdown is exceeded.
 6. Liquidation Calculation (Simulation Only): 
The script simulates liquidation prices based on the account balance and position size.
Liquidation lines are drawn on the chart to better visualize potential risk exposure.
This is purely a visual aid — no real broker-side liquidation is performed.
Dskyz Adaptive Futures Edge (DAFE)imgur.com/a/igj9lFj
Dskyz Adaptive Futures Edge (DAFE) is a futures trading strategy designed to adapt dynamically to market volatility and price action using a blend of technical indicators. The strategy combines adaptive moving averages, optional RSI filtering, candlestick pattern recognition, and multi-timeframe trend analysis to generate long and short trade signals. It incorporates robust risk management techniques including ATR-based stop-losses and trailing stops, ensuring trades are sized and managed within sustainable risk limits.
Key Components and Logic
-Adaptive Moving Averages
Dynamic Calculation: Fast and slow Simple Moving Averages (SMAs) adapt to changing volatility, making them sensitive to high-momentum shifts and smoothing during quieter price action.
Signal Generation: Entry signals are triggered when the fast SMA crosses the slow SMA in conjunction with price direction confirmation (e.g., price above both for long positions).
-RSI Filtering (Optional)
Momentum Confirmation: The RSI filter provides momentum confirmation to avoid overextended entries. It can be toggled on or off for both long and short conditions.
User Control: Adjustable parameters such as lookback period, oversold/overbought thresholds, and enable/disable switches give full control over its influence.
-Candlestick Pattern Recognition
Engulfing Logic: Recognizes strong bullish or bearish engulfing patterns with configurable strength criteria like range and volume. Patterns are filtered by trend direction and strength for confirmation.
Signal Conflict Handling: When both bullish and bearish engulfing patterns occur within the lookback window, the strategy avoids entry to reduce whipsaws in indecisive markets.
-Multi-Timeframe Trend Filter
Higher Timeframe Filtering: Incorporates 15-minute trend direction as a macro-level filter to align intrabar trades with larger trend momentum.
Smoothed Entry Logic: Prevents entering trades that go against the broader market structure, reducing false signals in choppy or low-conviction moves.
-Trade Execution and Risk Management
imgur.com
Entry Logic
Priority System: Users can define whether moving average signals or candlestick patterns should take priority when both are present.
Volume & Volatility Checks: Ensures sufficient market participation and action before entering a position, improving the odds of reliable follow-through.
Stop-Loss and Trailing Exit
ATR-Based Initial Stops: Dynamically adjusts stop-loss distance based on market volatility using a multiple of ATR (Average True Range), keeping risk proportional to price swings.
Trailing Stop: Protects open profits and enables winners to run by following price action at a set distance (also ATR-based).
-Cooldown Period & Minimum Bar Hold (Trade Discipline Logic)
Cooldown Bars: After an exit, the strategy imposes a mandatory pause before opening a new position.
Why: This avoids rapid-fire re-entries triggered by minor fluctuations that could lead to overtrading and degradation of profitability.
Minimum Bar Hold: A trade must be held for a minimum number of bars before it can be exited.
Why: This prevents the strategy from immediately exiting trades due to fleeting volatility spikes, which previously caused premature exits that often reversed back in favor of the original signal. This ensures trades have adequate time to develop, filtering out noise from true reversals.
-Visual Elements and Transparency Tools
Chart Overlays: Moving averages, RSI values, and trade entry/exit points are shown directly on the chart for complete visibility.
Dashboard UI: Displays critical live metrics—current position, PnL, time held, ATR values, etc.
Debug Logs: Optional toggles allow verbose condition tracking for deep inspection into why a trade occurred (or didn't), useful for both live optimization and debugging.
-Input Parameter Reference Guide
Input Name Function & Suggested Use
Use RSI Filter - Enables or disables RSI-based entry confirmation. Disable if price action alone is desired for entry decisions.
RSI Length - RSI lookback period. Lower values (e.g., 7–14) are more responsive; higher values reduce false signals.
Overbought / Oversold Levels - Used to detect exhaustion zones. E.g., avoid long entries above 70 or short entries below 30.
Use Candlestick Patterns - Enable detection of bullish/bearish engulfing patterns as trade signals. Disable to rely only on trend/MA.
Pattern Strength Thresholds (Range, Volume) - Filters out weak engulfing signals. Higher values require stronger patterns to trigger.
Use 15min Trend Filter - Adds multi-timeframe trend confirmation. Recommended for filtering entries against larger trend direction.
Fast MA - Base Length for fast adaptive moving average. Suggested: 10–25.
Slow MA - Base length for slow adaptive moving average. Suggested: 30–60.
Volatility Sensitivity Multiplier - Multiplies volatility adjustments for adaptive MA length. Higher = more reactive to volatility.
Entry Volume Filter - Filters out trades during low volume. Recommended to prevent entries in illiquid conditions.
ATR Length - Lookback period for ATR calculation. Suggested: 14.
Trailing Stop ATR Offset - Defines how far the stop-loss is from entry. 1.5–2.5 is typical for medium-volatility environments.
Trailing Stop ATR Multiplier - Determines trailing stop distance. 1.5 is tight; 3+ gives more room for trending trades.
Cooldown Bars After Exit - Prevents immediate re-entries. Suggested: 3–10 bars depending on timeframe.
Minimum Bars to Hold Trade - Ensures trades are held long enough to avoid knee-jerk exits. Suggested: 5–10 for intraday strategies.
Trading Hours (Start / End) - Sets the window of allowed trading. Prevents entries outside key session times (e.g., avoid pre-market).
Enable Logging / Debugging - Shows internal trade decision data for tuning and understanding the logic.
Compliance with TradingView Regulations
Realistic Backtesting: The strategy uses proper initial capital, fixed trade quantities, and risk parameters to reflect realistic scenarios.
Transparent Trade Logic: Every condition used for signal generation is documented and controllable by the user. Users can view each signal's rationale.
Risk Mitigation: Cooldown bars, ATR stops, and minimum trade duration ensure the strategy behaves predictably and prevents reckless trade behavior.
Customization: Full control over each module (MA, RSI, Candlestick, Trend, etc.) gives users the ability to tailor the strategy to suit various futures contracts or timeframes.
imgur.com
imgur.com
imgur.com
imgur.com
imgur.com
Summary
DAFE was built for high-stakes micro futures trading environments such as the MNQ, where milliseconds of volatility matter. This strategy's modular architecture, adaptive logic, and advanced risk controls make it an ideal framework for scalpers and swing traders alike.
BTCUSDT.P
Backtesting: www.dropbox.com
Deep Backtesting:
www.dropbox.com
****Currently testing on a prop account.
Caution Statement
This strategy is designed for educational and experimental purposes and should not be considered financial advice or a guaranteed method of profitability. While the DAFE (Dskyz Adaptive Futures Edge) strategy incorporates advanced filters, adaptive logic, and volatility-based risk management, its performance is subject to market conditions, data accuracy, and user configuration.
Futures trading involves substantial risk, and the leverage inherent in futures contracts can amplify both gains and losses. This strategy may execute trades rapidly and frequently under certain conditions—particularly when filters are disabled or thresholds are set too tightly—potentially leading to increased slippage, commissions, or unanticipated losses.
Users are strongly advised to:
Backtest thoroughly across various market regimes.
Adjust parameters responsibly and understand the implication of each input.
Paper trade in a simulated environment before going live.
Monitor trades actively and use discretion when market volatility increases.
-By using this strategy, you accept all risks and responsibility for any trading decisions made based on its output.
Heiken Ashi Supertrend ATR-SL StrategyThis indicator combines Heikin Ashi candle pattern analysis with Supertrend to generate high-probability trading signals with built-in risk management. It identifies potential entries and exits based on specific Heikin Ashi candlestick formations while providing automated ATR-based stop loss management.
Trading Logic:
The system generates long signals when a green Heikin Ashi candle forms with no bottom wick (indicating strong bullish momentum). Short signals appear when a red Heikin Ashi candle forms with no top wick (showing strong bearish momentum). The absence of wicks on these candles signals a high-conviction market move in the respective direction.
Exit signals are triggered when:
1. An opposite pattern forms (red candle with no top wick exits longs; green candle with no bottom wick exits shorts)
2. The ATR-based stop loss is hit
3. The break-even stop is activated and then hit
Technical Approach:
- Select Heiken Ashi Canldes on your Trading View chart.  Entried are based on HA prices.  
- Supertrend and ATR-based stop losses use real price data (not HA values) for trend determination
- ATR-based stop losses automatically adjust to market volatility
- Break-even functionality moves the stop to entry price once price moves a specified ATR multiple in your favor
Risk Management:
- Default starting capital: 1000 units
- Default risk per trade: 10% of equity (customizable in strategy settings)
- Hard Stop Loss: Set ATR multiplier (default: 2.0) for automatic stop placement
- Break Even: Configure ATR threshold (default: 1.0) to activate break-even stops
- Appropriate position sizing relative to equity and stop distance
Customization Options:
- Supertrend Settings:
  - Enable/disable Supertrend filtering (trade only in confirmed trend direction)
  - Adjust Factor (default: 3.0) to change sensitivity
  - Modify ATR Period (default: 10) to adapt to different timeframes
Visual Elements:
- Green triangles for long entries, blue triangles for short entries
- X-marks for exits and stop loss hits
- Color-coded position background (green for long, blue for short)
- Clearly visible stop loss lines (red for hard stop, white for break-even)
- Comprehensive position information label with entry price and stop details
Implementation Notes:
The indicator tracks positions internally and maintains state across bars to properly manage stop levels. All calculations use confirmed bars only, with no repainting or lookahead bias. The system is designed for swing trading on timeframes from 1-hour and above, where Heikin Ashi patterns tend to be more reliable.
This indicator is best suited for traders looking to combine the pattern recognition strengths of Heikin Ashi candles with the trend-following capabilities of Supertrend, all while maintaining disciplined risk management through automated stops.
Mogwai Method with RSI and EMA - BTCUSD 15mThis is a custom TradingView indicator designed for trading Bitcoin (BTCUSD) on a 15-minute timeframe. It’s based on the Mogwai Method—a mean-reversion strategy—enhanced with the Relative Strength Index (RSI) for momentum confirmation. The indicator generates buy and sell signals, visualized as green and red triangle arrows on the chart, to help identify potential entry and exit points in the volatile cryptocurrency market.
Components
Bollinger Bands (BB):
Purpose: Identifies overextended price movements, signaling potential reversions to the mean.
Parameters: 
Length: 20 periods (standard for mean-reversion).
Multiplier: 2.2 (slightly wider than the default 2.0 to suit BTCUSD’s volatility).
Role: 
Buy signal when price drops below the lower band (oversold).
Sell signal when price rises above the upper band (overbought).
Relative Strength Index (RSI):
Purpose: Confirms momentum to filter out false signals from Bollinger Bands.
Parameters:
Length: 14 periods (classic setting, effective for crypto).
Overbought Level: 70 (price may be overextended upward).
Oversold Level: 30 (price may be overextended downward).
Role: 
Buy signal requires RSI < 30 (oversold).
Sell signal requires RSI > 70 (overbought).
Exponential Moving Averages (EMAs) (Plotted but not currently in signal logic):
Purpose: Provides trend context (included in the script for visualization, optional for signal filtering).
Parameters:
Fast EMA: 9 periods (short-term trend).
Slow EMA: 50 periods (longer-term trend).
Role: Can be re-added to filter signals (e.g., buy only when Fast EMA > Slow EMA).
Signals (Triangles):
Buy Signal: Green upward triangle below the bar when price is below the lower Bollinger Band and RSI is below 30.
Sell Signal: Red downward triangle above the bar when price is above the upper Bollinger Band and RSI is above 70.
How It Works
The indicator combines Bollinger Bands and RSI to spot mean-reversion opportunities:
Buy Condition: Price breaks below the lower Bollinger Band (indicating oversold conditions), and RSI confirms this with a reading below 30.
Sell Condition: Price breaks above the upper Bollinger Band (indicating overbought conditions), and RSI confirms this with a reading above 70.
The strategy assumes that extreme price movements in BTCUSD will often revert to the mean, especially in choppy or ranging markets.
Visual Elements
Green Upward Triangles: Appear below the candlestick to indicate a buy signal.
Red Downward Triangles: Appear above the candlestick to indicate a sell signal.
Bollinger Bands: Gray lines (upper, middle, lower) plotted for reference.
EMAs: Blue (Fast) and Orange (Slow) lines for trend visualization.
How to Use the Indicator
Setup
Open TradingView:
Log into TradingView and select a BTCUSD chart from a supported exchange (e.g., Binance, Coinbase, Bitfinex).
Set Timeframe:
Switch the chart to a 15-minute timeframe (15m).
Add the Indicator:
Open the Pine Editor (bottom panel in TradingView).
Copy and paste the script provided.
Click “Add to Chart” to apply it.
Verify Display:
You should see Bollinger Bands (gray), Fast EMA (blue), Slow EMA (orange), and buy/sell triangles when conditions are met.
Trading Guidelines
Buy Signal (Green Triangle Below Bar):
What It Means: Price is oversold, potentially ready to bounce back toward the Bollinger Band middle line.
Action:
Enter a long position (buy BTCUSD).
Set a take-profit near the middle Bollinger Band (bb_middle) or a resistance level.
Place a stop-loss 1-2% below the entry (or based on ATR, e.g., ta.atr(14) * 2).
Best Context: Works well in ranging markets; avoid during strong downtrends.
Sell Signal (Red Triangle Above Bar):
What It Means: Price is overbought, potentially ready to drop back toward the middle line.
Action:
Enter a short position (sell BTCUSD) or exit a long position.
Set a take-profit near the middle Bollinger Band or a support level.
Place a stop-loss 1-2% above the entry.
Best Context: Effective in ranging markets; avoid during strong uptrends.
Trend Filter (Optional):
To reduce false signals in trending markets, you can modify the script:
Add and ema_fast > ema_slow to the buy condition (only buy in uptrends).
Add and ema_fast < ema_slow to the sell condition (only sell in downtrends).
Check the Fast EMA (blue) vs. Slow EMA (orange) alignment visually.
Tips for BTCUSD on 15-Minute Charts
Volatility: BTCUSD can be erratic. If signals are too frequent, increase bb_mult (e.g., to 2.5) or adjust RSI levels (e.g., 75/25).
Confirmation: Use volume spikes or candlestick patterns (e.g., doji, engulfing) to confirm signals.
Time of Day: Mean-reversion works best during low-volume periods (e.g., Asian session in crypto).
Backtesting: Use TradingView’s Strategy Tester (convert to a strategy by adding entry/exit logic) to evaluate performance with historical BTCUSD data up to March 13, 2025.
Risk Management
Position Size: Risk no more than 1-2% of your account per trade.
Stop Losses: Always use stops to protect against BTCUSD’s sudden moves.
Avoid Overtrading: Wait for clear signals; don’t force trades in choppy or unclear conditions.
Example Scenario
Chart: BTCUSD, 15-minute timeframe.
Buy Signal: Price drops to $58,000, below the lower Bollinger Band, RSI at 28. A green triangle appears.
Action: Buy at $58,000, target $59,000 (middle BB), stop at $57,500.
Sell Signal: Price rises to $60,500, above the upper Bollinger Band, RSI at 72. A red triangle appears.
Action: Sell at $60,500, target $59,500 (middle BB), stop at $61,000.
This indicator is tailored for mean-reversion trading on BTCUSD. Let me know if you’d like to tweak it further (e.g., add filters, alerts, or alternative indicators)!
AO Smart Scalper – 5M Dynamic SL Edition📈 AO Signals with Fixed and Dynamic SL – Optimized for 5-Minute Charts 📉
This indicator is built for 5-minute timeframe trading, combining powerful momentum signals from the Awesome Oscillator (AO) with both Fixed and Dynamic Stop Loss (SL) levels to enhance trade management and risk control.
✅ Buy/Sell Signals:
The indicator generates clear BUY and SELL signals based on the AO crossing above or below the zero line, helping traders capture momentum shifts early.
🛑 Fixed Stop Loss:
Each trade signal comes with a Fixed SL, calculated based on the high (for shorts) or low (for longs) of the previous candle, with a customizable percentage offset. This SL is plotted with a red line, providing a clear initial risk level.
⚡ Dynamic Stop Loss: Continuous Presence, Strategic Use:
A secondary Dynamic SL line is plotted, which is continuously present on the chart. This dynamic level responds to market conditions and can serve as a trailing stop or key decision point.
💡 Recommended Use: It is recommended to actively start using the Dynamic SL once the trade has moved into profit. This allows protecting obtained profits and minimizing the risk of losses in case of a market reversal.
🛡️ Enhanced Dynamic Stop-Loss Strategy:
🔒 Initial Protection: Utilize the Fixed SL as the initial stop-loss, placed below relevant lows (for longs) or above relevant highs (for shorts), or as provided by the fixed SL indicator.
🛤️ Dynamic Tracking:
🟢 Long Trades: Once in profit, the Dynamic SL will dynamically adjust, moving upwards as higher lows are formed, effectively trailing the price and securing profits.
🔴 Short Trades: Conversely, in short trades, once in profit, the Dynamic SL will move downwards as lower highs are formed, protecting gains.
🔄 Alternatively the dynamic stop loss will follow the dynamic SL line provided by the indicator.
🚪 Exiting Trades: When the price crosses below the Dynamic SL line in a LONG trade, or above it in a SHORT trade, the recommended action is to exit the trade.
↩️ Re-entry Consideration: You may consider re-entering only if the price clearly returns above the Dynamic SL (for longs) or below it (for shorts).
⚠️ IMPORTANT - 5-Minute Strategy Guidance ⏱️
This tool is specifically optimized for the 5-minute timeframe. This approach helps filter out weak setups and maintain discipline in volatile market conditions.
✨ Additional Features:
👁️ Visual and editable SL levels
📊 200-period SMA for trend context
💻 Simple and effective interface for intraday trading setups
🎯 Ideal for traders seeking a clean, rule-based system that combines momentum entry signals with layered stop loss protection.
🔑 Key Changes:
It was emphasized that the Dynamic SL is always present, but its active use is recommended once the trade is in profit.
It was clarified the use of the Fixed SL, giving the option to use the one provided by the indicator, or to place it according to the price action.
Smart MA Crossover BacktesterSmart MA Crossover Backtester - Strategy Overview
Strategy Name: Smart MA Crossover Backtester
Published on: TradingView
Applicable Markets: Works well on crypto (tested profitably on ETH)
Strategy Concept
The Smart MA Crossover Backtester is an improved Moving Average (MA) crossover strategy that incorporates a trend filter and an ATR-based stop loss & take profit mechanism for better risk management. It aims to capture trends efficiently while reducing false signals by only trading in the direction of the long-term trend.
Core Components & Logic
Moving Averages (MA) for Entry Signals
Fast Moving Average (9-period SMA)
Slow Moving Average (21-period SMA)
A trade signal is generated when the fast MA crosses the slow MA.
Trend Filter (200-period SMA)
Only enters long positions if price is above the 200-period SMA (bullish trend).
Only enters short positions if price is below the 200-period SMA (bearish trend).
This helps in avoiding counter-trend trades, reducing whipsaws.
ATR-Based Stop Loss & Take Profit
Uses the Average True Range (ATR) with a multiplier of 2 to calculate stop loss.
Risk-Reward Ratio = 1:2 (Take profit is set at 2x ATR).
This ensures dynamic stop loss and take profit levels based on market volatility.
Trading Rules
✅ Long Entry (Buy Signal):
Fast MA (9) crosses above Slow MA (21)
Price is above the 200 MA (bullish trend filter active)
Stop Loss: Below entry price by 2× ATR
Take Profit: Above entry price by 4× ATR
✅ Short Entry (Sell Signal):
Fast MA (9) crosses below Slow MA (21)
Price is below the 200 MA (bearish trend filter active)
Stop Loss: Above entry price by 2× ATR
Take Profit: Below entry price by 4× ATR
Why This Strategy Works Well for Crypto (ETH)?
🔹 Crypto markets are highly volatile – ATR-based stop loss adapts dynamically to market conditions.
🔹 Long-term trend filter (200 MA) ensures trading in the dominant direction, reducing false signals.
🔹 Risk-reward ratio of 1:2 allows for profitable trades even with a lower win rate.
This strategy has been tested on Ethereum (ETH) and has shown profitable performance, making it a strong choice for crypto traders looking for trend-following setups with solid risk management. 🚀
Breaks and Retests - Free990Strategy Description: "Breaks and Retests - Free990" 
The "Breaks and Retests - Free990" strategy is based on identifying breakout and retest opportunities for potential entries in both long and short trades. The idea is to detect price breakouts above resistance levels or below support levels, and subsequently identify retests that confirm the breakout levels. The strategy offers an automated approach to enter trades after a breakout followed by a retest, which serves as a confirmation of trend continuation.
Key Components:
Support and Resistance Detection:
The strategy calculates pivot levels based on historical price movements to define support and resistance areas. A lookback range is used to determine these key levels.
Breakouts and Retests:
The system identifies when a breakout occurs above a resistance level or below a support level.
It then waits for a retest of the previously broken level as confirmation, which is often a better entry opportunity.
Trade Direction Selection:
Users can choose between "Long Only," "Short Only," or "Both" directions for trading based on their market view.
Stop Loss and Trailing Stop:
An initial stop loss is placed at a defined percentage away from the entry.
The trailing stop loss is activated after the position gains a specified percentage in profit.
Long Entry:
A long entry is triggered if the price breaks above a resistance level and subsequently retests that level successfully.
The entry condition checks if the breakout was confirmed and if a retest was valid.
The long entry is only executed if the user-selected direction is either "Long Only" or "Both."
Short Entry:
A short entry is triggered if the price breaks below a support level and subsequently retests that level.
The short entry is only executed if the user-selected direction is either "Short Only" or "Both."
sell_condition checks whether the support has been broken and whether the retest condition is valid.
An initial stop loss is placed when the trade is opened to limit the risk if the trade moves against the position.
The stop loss is calculated based on a user-defined percentage (stop_loss_percent) of the entry price.
pinescript
Copy code
stop_loss_price := strategy.position_avg_price * (1 - stop_loss_percent / 100)
For long positions, the stop loss is placed below the entry price.
For short positions, the stop loss is placed above the entry price.
Trailing Stop:
When a position achieves a certain profit threshold (profit_threshold_percent), the trailing stop mechanism is activated.
For long positions, the trailing stop follows the highest price reached, ensuring that some profit is locked in if the price reverses.
For short positions, the trailing stop follows the lowest price reached.
Code Logic for Trailing Stop:
Exit Execution:
The strategy exits the position when the price hits the calculated stop loss level.
This includes both the initial stop loss and the trailing stop that adjusts as the trade progresses.
Code Logic for Exit:
Summary:
Breaks and Retests - Free990 uses support and resistance levels to identify breakouts, followed by retests for confirmation.
Entry Points: Triggered when a breakout is confirmed and a retest occurs, for both long and short trades.
Exit Points:
Initial Stop Loss: Limits risk for both long and short trades.
Trailing Stop Loss: Locks in profits as the price moves in favor of the position.
This strategy aims to capture the momentum after breakouts and minimize losses through effective use of stop loss and trailing stops. It gives the flexibility of selecting trade direction and ensures trades are taken with confirmation through the retest, which helps to reduce false breakouts.
Original Code by @HoanGhetti
Dual Strategy Selector V2 - CryptogyaniOverview:
This script provides traders with a dual-strategy system that they can toggle between using a simple dropdown menu in the input settings. It is designed to cater to different trading styles and needs, offering both simplicity and advanced filtering techniques. The strategies are built around moving average crossovers, enhanced by configurable risk management tools like take profit levels, trailing stops, and ATR-based stop-loss.
Key Features:
Two Strategies in One Script:
Strategy 1: A classic moving average crossover strategy for identifying entry signals based on trend reversals. Includes user-defined take profit and trailing stop-loss options for profit locking.
Strategy 2: An advanced trend-following system that incorporates:
A higher timeframe trend filter to confirm entry signals.
ATR-based stop-loss for dynamic risk management.
Configurable partial take profit to secure gains while letting the trade run.
Highly Customizable:
All key parameters such as SMA lengths, take profit levels, ATR multiplier, and timeframe for the trend filter are adjustable via the input settings.
Dynamic Toggle:
Traders can switch between Strategy 1 and Strategy 2 with a single dropdown, allowing them to adapt the strategy to market conditions.
How It Works:
Strategy 1:
Entry Logic: A long trade is triggered when the fast SMA crosses above the slow SMA.
Exit Logic: The trade exits at either a user-defined take profit level (percentage or pips) or via an optional trailing stop that dynamically adjusts based on price movement.
Strategy 2:
Entry Logic: Builds on the SMA crossover logic but adds a higher timeframe trend filter to align trades with the broader market direction.
Risk Management:
ATR-Based Stop-Loss: Protects against adverse moves with a volatility-adjusted stop-loss.
Partial Take Profit: Allows traders to secure a percentage of gains while keeping some exposure for extended trends.
How to Use:
Select Your Strategy:
Use the dropdown in the input settings to choose Strategy 1 or Strategy 2.
Configure Parameters:
Adjust SMA lengths, take profit, and risk management settings to align with your trading style.
For Strategy 2, specify the higher timeframe for trend filtering.
Deploy and Monitor:
Apply the script to your preferred asset and timeframe.
Use the backtest results to fine-tune settings for optimal performance.
Why Choose This Script?:
This script stands out due to its dual-strategy flexibility and enhanced features:
For beginners: Strategy 1 provides a simple yet effective trend-following system with minimal setup.
For advanced traders: Strategy 2 includes powerful tools like trend filters and ATR-based stop-loss, making it ideal for challenging market conditions.
By combining simplicity with advanced features, this script offers something for everyone while maintaining full transparency and user customization.
Default Settings:
Strategy 1:
Fast SMA: 21, Slow SMA: 49
Take Profit: 7% or 50 pips
Trailing Stop: Optional (disabled by default)
Strategy 2:
Fast SMA: 20, Slow SMA: 50
ATR Multiplier: 1.5
Partial Take Profit: 50%
Higher Timeframe: 1 Day (1D)
Crypto Volatility Bitcoin Correlation Strategy Description:
The Crypto Volatility Bitcoin Correlation Strategy is designed to leverage market volatility specifically in Bitcoin (BTC) using a combination of volatility indicators and trend-following techniques. This strategy utilizes the VIXFix (a volatility indicator adapted for crypto markets) and the BVOL7D (Bitcoin 7-Day Volatility Index from BitMEX) to identify periods of high volatility, while confirming trends with the Exponential Moving Average (EMA). These components work together to offer a comprehensive system that traders can use to enter positions when volatility and trends are aligned in their favor.
Key Features:
VIXFix (Volatility Index for Crypto Markets): This indicator measures the highest price of Bitcoin over a set period and compares it with the current low price to gauge market volatility. A rise in VIXFix indicates increasing market volatility, signaling that large price movements could occur.
BVOL7D (Bitcoin 7-Day Volatility Index): This volatility index, provided by BitMEX, measures the volatility of Bitcoin over the past 7 days. It helps traders monitor the recent volatility trend in the market, particularly useful when making short-term trading decisions.
Exponential Moving Average (EMA): The 50-period EMA acts as a trend indicator. When the price is above the EMA, it suggests the market is in an uptrend, and when the price is below the EMA, it suggests a downtrend.
How It Works:
Long Entry: A long position is triggered when both the VIXFix and BVOL7D indicators are rising, signaling increased volatility, and the price is above the 50-period EMA, confirming that the market is trending upward.
Exit: The strategy exits the position when the price crosses below the 50-period EMA, which signals a potential weakening of the uptrend and a decrease in volatility.
This strategy ensures that traders only enter positions when the volatility aligns with a clear trend, minimizing the risk of entering trades during periods of market uncertainty.
Testing and Timeframe:
This strategy has been tested on Bitcoin using the daily timeframe, which provides a longer-term perspective on market trends and volatility. However, users can adjust the timeframe according to their trading preferences. It is crucial to note that this strategy does not include comprehensive risk management, aside from the exit condition when the price crosses below the EMA. Users are strongly advised to implement their own risk management techniques, such as setting appropriate stop-loss levels, to safeguard their positions during high volatility periods.
Utility:
The Crypto Volatility Bitcoin Correlation Strategy is particularly well-suited for traders who aim to capitalize on the high volatility often seen in the Bitcoin market. By combining volatility measurements (VIXFix and BVOL7D) with a trend-following mechanism (EMA), this strategy helps identify optimal moments for entering and exiting trades. This approach ensures that traders participate in potentially profitable market moves while minimizing exposure during times of uncertainty.
Use Cases:
Volatility-Based Entries: Traders looking to take advantage of market volatility spikes will find this strategy useful for timing entry points during market swings.
Trend Confirmation: By using the EMA as a confirmation tool, traders can avoid entering trades that go against the trend, which can result in significant losses during volatile market conditions.
Risk Management: While the strategy exits when price falls below the EMA, it is important to recognize that this is not a full risk management system. Traders should use caution and integrate additional risk measures, such as stop-losses and position sizing, to better manage potential losses.
How to Use:
Step 1: Monitor the VIXFix and BVOL7D indicators. When both are rising and the Bitcoin price is above the EMA, the strategy will trigger a long entry, indicating that the market is experiencing increased volatility with a confirmed uptrend.
Step 2: Exit the position when the price drops below the 50-period EMA, signaling that the trend may be reversing or weakening, reducing the likelihood of continued upward price movement.
This strategy is open-source and is intended to help traders navigate volatile market conditions, particularly in Bitcoin, using proven indicators for volatility and trend confirmation.
Risk Disclaimer:
This strategy has been tested on the daily timeframe of Bitcoin, but users should be aware that it does not include built-in risk management except for the below-EMA exit condition. Users should be extremely cautious when using this strategy and are encouraged to implement their own risk management, such as using stop-losses, position sizing, and setting appropriate limits. Trading involves significant risk, and this strategy does not guarantee profits or prevent losses. Past performance is not indicative of future results. Always test any strategy in a demo environment before applying it to live markets.






















